HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
  • Insights
  • Verify Certificate
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials

HTML5andCSS3.org helps developers learn modern frontend skills with practical tutorials, production-ready snippets, and fast web tools built for everyday coding.

Quick Links

  • About Us
  • Contact Us
  • Privacy Policy
  • Copyright
  • Disclaimer

Top Tools

  • Try It Editor
  • JSON Formatter
  • CSS Minifier
  • HTML Minifier
  • Base64 Encoder / Decoder

Contact

  • business@html5andcss3.org
Newsletter

Learn at your own pace, practice with useful tools, and build websites you're proud of.

© 2011-2026 html5andcss3.org. All rights reserved.

How to Use

HTML Tutorial

HTML Basics

Introduction to HTMLHTML EditorsHTML StructureHTML Elements & AttributesHTML HeadingsHTML ParagraphsHTML FormattingHTML CommentsHTML Styles

HTML Text and Links

HTML Text FormattingHTML Quotations & CitationsHTML LinksHTML Email Links

HTML Lists and Tables

HTML ListsHTML TablesTable Styling & Borders

HTML Images and Media

HTML ImagesHTML Picture ElementHTML AudioHTML VideoHTML Embed & Object

HTML Forms

HTML Forms OverviewHTML Form ElementsHTML Input TypesHTML Input AttributesHTML Form AttributesHTML Form Validation

HTML Layout

HTML Block vs Inline ElementsHTML Div & SpanHTML Semantic Layout TagsHTML Iframes

Advanced HTML

HTML Entities & SymbolsHTML EmojisHTML Head Element TagsHTML Meta Tags for SEOHTML Responsive Design

HTML References

HTML5 New TagsDeprecated TagsHTML Global AttributesEvent AttributesComplete HTML Tag ListComplete HTML5 ElementsHTML Tutorial PDF
  1. Home
  2. /
  3. Tutorials
  4. /
  5. HTML Tutorial
  6. /
  7. HTML Headings

HTML Basics

HTML Headings

Headings in HTML define the titles and subtitles of a webpage.
They help organize your content, improve readability, and play an important role in SEO by showing search engines what your page is about.

What Are HTML Headings?

HTML provides six levels of headings, from <h1> to <h6>.
Each heading represents a different level of importance - with <h1> being the most important and <h6> the least.

Example

html

<h1>This is Heading 1</h1>
<h2>This is Heading 2</h2>
<h3>This is Heading 3</h3>
<h4>This is Heading 4</h4>
<h5>This is Heading 5</h5>
<h6>This is Heading 6</h6>

Explanation of Heading Levels

  • <h1> - Used for the main title of the page or main topic.
  • <h2> - Used for major subheadings under <h1>.
  • <h3> to <h6> - Used for sub-sections or smaller details.

Browsers automatically display <h1> as the largest text and <h6> as the smallest.

Example: Headings in Real Use

Real Example

html

<h1>HTML Tutorial</h1>
<h2>Introduction</h2>
<h3>What is HTML?</h3>
<h4>History of HTML</h4>

This structure shows a clear hierarchy - just like chapters and sections in a book.

Styling Headings with CSS

While HTML defines structure, CSS controls how headings look.

Styling Header

html

<h1 style="color: #29AB87; font-family: Arial;">Welcome to My Website</h1>

You can change color, size, font, or alignment using CSS - but the semantic meaning of the tag remains the same.

SEO and Accessibility Tips

  • Always use only one <h1> per page.
  • Maintain logical order - don’t skip from <h1> to <h4>.
  • Use headings to organize content, not just to make text look bigger.
  • Search engines use headings to understand page hierarchy and keyword relevance.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

Conclusion

HTML headings help both users and search engines understand your content.
Use them logically, consistently, and semantically - your pages will be easier to read, better organized, and more SEO-friendly.

PreviousHTML Elements & AttributesNextHTML Paragraphs