Basic HTML Page Structure

Hello, World!

This is a basic HTML page. It uses the DOCTYPE declaration, a <head> section with metadata, and a <body> section for content.


HTML stands for HyperText Markup Language. It is the standard language for creating web pages.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First HTML Page</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is a basic HTML page.</p>
  <hr>
  <p>HTML stands for <em>HyperText Markup Language</em>.</p>
</body>
</html>

HTML Headings (h1–h6)

Heading 1 — Main Title

Heading 2 — Section

Heading 3 — Subsection

Heading 4

Heading 5
Heading 6 — Smallest
<h1>Heading 1 — Main Title</h1>
<h2>Heading 2 — Section</h2>
<h3>Heading 3 — Subsection</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6 — Smallest</h6>

HTML Comments & Special Characters

HTML allows you to include special characters using entities:

  • < — less than: &lt;
  • > — greater than: &gt;
  • & — ampersand: &amp;
  • © — copyright: &copy;
  •   — non-breaking space: &nbsp;
<!-- This is an HTML comment — it won't be displayed -->
<p>
  &lt; — less than <br>
  &gt; — greater than <br>
  &amp; — ampersand <br>
  &copy; — copyright <br>
  &nbsp; — non-breaking space
</p>