W3Newbie
  • HTML Tutorial
  • CSS Tutorial
  • Web Dev
    • VS Code Tutorial
    • Command Line Tutorial
    • Git Tutorial
    • Github Tutorial
    • Sass Tutorial
  • Courses
  • Resources
  • Tutorials
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

HTML Headings

HTML headings, defined using <h1> to <h6> tags, structure content on a web page by defining headings and subheadings. Here’s an example of an HTML heading:

HTML:

<h1>This is a Heading 1</h1>

Key points about HTML headings:

  • Headings are block-level elements, meaning they start on a new line and create a distinct block of content.
  • They have different default font sizes and weights to visually distinguish them from regular paragraphs.
  • HTML offers six heading levels, from <h1> (largest) to <h6> (smallest), each with decreasing importance and font sizes.
  • <h1> is typically used for the main title of a page or section, while <h2> to <h6> are used for subheadings and subsections.

Example Heading Structure with Paragraphs:

HTML:

<h1>Main Page Title</h1>
<h2>Section 1 Heading</h2>
<p>Paragraph text within section 1.</p>
<h3>Subsection 1.1 Heading</h3>
<p>More paragraph text.</p>

Importance of Headings:

  • Information hierarchy: Headings create a clear structure and organization for the content, helping users understand the main topics and flow of information.
  • Readability: They break up text into visually distinct sections, making it easier to scan and read.
  • Accessibility: Screen readers and assistive technologies use headings to navigate and understand the content effectively.
  • SEO: Search engines use headings to understand the structure and topics of web pages, potentially influencing rankings.

Best Practices:

  • Use headings logically and consistently to create a clear content structure.
  • Use <h1> only once per page for the main title.
  • Use heading levels in order of importance (don’t skip levels).
  • Consider accessibility guidelines for heading usage.
< Previous
Next Lesson >
  • HTML Tutorial
  • HTML Introduction
  • HTML Text Editor
  • HTML Document
  • HTML Comments
  • HTML Elements
  • HTML Paragraphs
  • HTML Headings
  • HTML Text Formatting
  • HTML Links
  • HTML Images
  • HTML Unordered Lists
  • HTML Ordered Lists
  • HTML Tables
  • HTML Block Elements
  • HTML Inline Elements
  • HTML Attributes
  • HTML Classes
  • HTML IDs
  • HTML Audio
  • HTML Video
  • HTML Divs
  • HTML Semantics
  • HTML Accessibility
  • HTML Forms

The Newbie Template Bundle

The 12 Website Bundle Pack

Subscribe on YouTube

Web Development Courses

The HTML Email Mastery Course - Build Responsive HTML Email Templates.

Latest Tutorial Posts

  • The HTML Email Mastery Course - Build Responsive HTML Email Templates.w3newbie.com
    HTML Email Mastery Course CouponOctober 12, 2020 - 8:10 pm
  • Create A 5 Page Website With PHP Includes, HTML5, CSS3 & Bootstrap 4w3newbie.com
    Create A 5 Page Website With PHP Includes, HTML5, CSS3 & Bootstrap 4April 22, 2019 - 1:48 pm
© w3newbie.com, 2026. Terms of Use. Privacy Policy.
Scroll to top Scroll to top Scroll to top