Using Headings in HTML
HTML provides six levels of headings, from
(most important) to (least important).
Headings help structure your content and are important for SEO and accessibility. Search engines use headings to understand your page structure.
<h1>Main Heading (Largest)</h1>
<h2>Subheading</h2>
<h3>Sub-subheading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading (Smallest)</h6>
- <h1> - Main page heading (use only once per page)
- <h2> - Major sections
- <h3> - Subsections
- <h4> to
- Further subdivisions
Try Headings
<h1>Welcome to My Website</h1>
<h2>About Me</h2>
<p>This is a paragraph about me.</p>
<h2>My Skills</h2>
<h3>Programming</h3>
<p>I know HTML, CSS, and JavaScript.</p>
<h3>Design</h3>
<p>I can create beautiful websites.</p>
Note: Use headings in hierarchical order. Don't skip levels (e.g., don't jump from