HTML Introduction


🔹 What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create web pages and describe their structure and content.

It uses tags/elements to mark up text, images, links, and other content to be displayed in a browser.

Example:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Web Page</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is a paragraph.</p>
  </body>
</html>
 

🔹 Key Points

  • HTML is not a programming language; it's a markup language.

  • It uses tags like <html>, <head>, <body>, <p>, <h1> etc.

  • HTML tags usually come in pairs: an opening tag <tag> and a closing tag </tag>.

  • The browser does not display HTML tags but uses them to render content.


🔹 Basic HTML Document Structure

<!DOCTYPE html>       <!-- Declares the HTML version -->
<html>                <!-- Root element -->
  <head>              <!-- Metadata, title, etc. -->
    <title>Title</title>
  </head>
  <body>              <!-- Main content visible to users -->
    <h1>Heading</h1>
    <p>Paragraph text</p>
  </body>
</html>
 

🔹 Tags Overview

Tg Description
<html> Root of the HTML document
<head> Contains meta info
<title> Sets the browser tab title
<body> Main visible content
<h1> Heading (H1 is largest)
<p> Paragraph

Practice Questions

Q1. Create a simple web page with a heading and a paragraph.

Q2. Add a title to your HTML document.

Q3. Display three levels of headings.

Q4. Write a paragraph and make a word bold.

Q5. Create a page with two paragraphs.


HTML Introduction Quiz

Q1: What does HTML stand for?

A. Hyper Trainer Marking Language
B. HyperText Markup Language
C. HighText Machine Language
D. None of the above

Q2: Which of the following is the correct HTML element for the largest heading?

A. <head>
B. <h6>
C. <h1>
D. <heading>

Q3: What is the correct HTML element for inserting a line break?

A. <break>
B. <br>
C. <lb>
D. <hr>

Q4: Which tag is used to create a paragraph in HTML?

A. <p>
B. <para>
C. <paragraph>
D. <text>

Q5: Where does the <title> tag appear in an HTML document?

A. Inside the <body>
B. Inside the <footer>
C. Inside the <head>
D. After <html>

Go Back Top