HTML Heading Tags
Headlines in HTML are used to produce titles or principle on a webpage. They help organize the content and make it easier to read and understand. headlines also help search machines like Google understand your content more.
Types of Heading tags
There are 6 situations of heading tags in HTML, from <h1> to
<h6>.
| Tag | Purpose |
|---|---|
<h1> |
Main title. This should be used only once per web page. |
<h2> |
Sub-heading under <h1>. |
<h3> |
Sub-heading under <h2>. |
<h4> |
Sub-heading under <h3>. |
<h5> |
Sub-heading under <h4>. |
<h6> |
Lowest title. Used for minor sections. |
Example
<h1>Main Title of the Page</h1>
<h2>Section 1</h2>
<p>Content under Section 1...</p>
<h3>Subsection 1.1</h3>
<p>Content under Subsection 1.1...</p>
<h2>Section 2</h2>
<p>Content under Section 2...</p>
<h6>Minor Note</h6>
As you can see, the text inside <h1> will appear the biggest, and
<h6>
will be the lowest. Use these headlines to produce a clean and clear structure for your
webpage.
Tip: noway skip heading situations (like using <h3>
ahead of
<h2>) unless you have a specific reason. It helps keep your content
organized and
SEO-friendly.
HTML headlines (h1 to h6)
<h1>
his is the biggest and most important title. It's generally used for the main title of a web page. Search machines also give it special attention for SEO, so we substantially use it just once on a browser.
<h1>This is heading 1.</h1>
<h2>
This is the alternate position heading. It's used for principles or major sections under the main title. You can use it multiple times on a web page to divide content into big section.
<h2>This is heading 2.</h2>
<h3>
This title is lower than <h2> and is used to divide content inside an h2
section. suppose of
it like a sub-subheading. It helps organize content orderly
<h3>This is heading 3.</h3>
<h4>
A lower title than <h3>, this heading is substantially used for more
detailed breakdowns. It’s
not veritably common but useful when your content is deep and needs clear way or
situations.
<h4>This is heading 4.</h4>
<h5>
This is infrequently used. It's indeed lower than <h4> and is
substantially for accuracy
minor sections. It’s useful only in long documents with various layers of content.
<h5>This is heading 5.</h5>
<h6>
The lowest heading label. It shows least important headlines. frequently used in notes or captions. utmost websites do n’t go this far unless it's for deeply nested word.
<h6>This is heading 6.</h6>
All heading tags automatically make text bold and larger, but you can change their size or style using CSS if you want. Always use headlines in order to keep your HTML organized and readable.