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.


Go Back Top