HTML/Introduction of HTML

First HTML Program

Updated on January 5, 2026
1 min read

What is HTML Structure?

HTML structure is the basic layout of an HTML document.

Every HTML page follows a fixed structure so that the browser can understand it correctly.

<!DOCTYPE html>
<html>
<head>
    <title>My First Web Page</title>
</head>
<body>

    <h1>Hello World</h1>
    <p>This is my first HTML page.</p>

</body>
</html>

Explanation of Each Tag

<!DOCTYPE html>

This tells the browser that the document is written in HTML5.

<html>

This is the root tag.

 All HTML content is written inside this tag.

<head>

The head section contains information about the page, not visible on the screen.

Examples:

  • Page title
  • Meta information
  • CSS links

<title>

The title appears on the browser tab.

<body>

The body contains all visible content of the web page.

Examples:

  • Text
  • Images
  • Buttons
  • Links

Important Points

  • HTML tags usually come in pairs (opening and closing)
  • Indentation makes code easy to read
  • Always save HTML files with .html extension