/*------------*/ Learn HTML and know that you don’t know
Daily News

Learn HTML And Know That You Don’t Know

What is HTML?

Learn HTML and know that you don’t know
  • HTML stands for “Hypertext Markup Language.”
  • It is the language used to create web pages and give them structure and format.
  • HTML uses tags to mark different elements on a web page.
  • Tags are like order or instructions that tell the web browser how to display the content.
  • HTML Tags always comes in pairs: one is called opening and another is called Closing tag. Tags always enclosed by angel bracket (<>).
  • Web browsers read the HTML code and display the web page accordingly.

Basic HTML Structure

  • Every HTML document starts with the <html> tag and ends with the </html> tag.
  • The main content of a web page is placed between the <body> and </body> tags.
  • Headings are used to create different levels of headings, such as <h1>, <h2>, <h3>, and so on.
  • Paragraphs are created using the <p> tag.
  • Links are created using the <a> tag and the href attribute, which specifies the URL of the linked page.

Working with Images

  • You can add images to your web page with the help of this <img> tag.
  • The src attribute is used to specify the source or location of the image file.
  • Alt attribute provides alternative text for the image, which is displayed if the image cannot be loaded.
  • You can resize your Images the width and height attributes.

Creating Lists

  • Unordered lists are created using the <ul> tag and list items are created using the <li> tag.
  • Ordered lists are created using the <ol> tag, and list items are also created using the <li> tag.
  • Nested lists can be created by placing one list inside another.

Formatting Text

  • Text can be formatted using different tags, such as <strong> for bold, <em> for italic, and <u> for underline.
  • Headings, paragraphs, and other text can be aligned using CSS styles.
Learn HTML and know that you don’t know

Adding Basic Styling

  • CSS (Cascading Style Sheets) is used to add styles and colors to HTML elements.
  • CSS can be added to an HTML page using the <style> tag or by linking an external CSS file.
  • Colors can be specified using different color names or hexadecimal codes.

Q.1 What does HTML stand for?

  • HTML stands for Hypertext Markup Language.

Q 2.What is the purpose of HTML in web development?

  • HTML is used to create web pages and give them structure and format.

Q 3.What are HTML tags? Give examples of three commonly used HTML tags.

  • HTML tags are instructions that tell the web browser how to display content.
    • Examples of commonly used HTML tags are:
      • <h1> for heading
      • <p> for paragraph
      • <a> for hyperlink

Q.4 How do you create a hyperlink in HTML? Explain with an example.

Q 5.How do you add an image to an HTML page? Explain with the required HTML tags and attributes.

  • Images are added using the tag and the src attribute to specify the image source.
    • Example: <img src=”image.jpg” alt=”Description of the image”>

Q 6.What is the purpose of the alt attribute in an <img> tag?

  • The alt attribute provides alternative text for the image, which is displayed if the image cannot be loaded.

Q 7.How do you create a numbered list in HTML? Provide an example.

  • Numbered lists are created using the
      tag, and each list item is created using the
    1. tag.
      • Example:
        • code

<ol> <li>First item</li>

<li>Second item</li>

<li>Third item</li> </ol>

Q 8.Explain what is an opening tag and a closing tag in HTML?

  • An opening tag is used to start an HTML element, while a closing tag is used to end it.

Q 9.How do you format text as bold in HTML? Provide an example.

  • Text can be formatted as bold using the tag.
    • Example: <strong>This text is bold</strong>

Q 10.What is the role of CSS in HTML? Briefly explain its purpose and how it is used.

  • CSS (Cascading Style Sheets) is used to add styles and colors to HTML elements.
  • It is used to control the appearance of web pages by specifying fonts, colors, layouts, and more.

Surendra Gusain

Hi, I am Surendra Gusain founder-director of DOTNET Institute and a Professional IT Trainer, Digital Marketing Trainer, Youtuber, and Blogger with 23 years of experience in computer training at DOTNET Institute.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button