Learn HTML
Lesson 1 - Overview Of The Web And HTML
Lesson 3 - Images And Multimedia
Lesson 4 - Writing Your First HTML Page
Lesson 5 - Overview Of CSS
Lesson 6 - CSS Selectors And Properties
Lesson 7 - Applying CSS To HTML
Lesson 8 - Box Model
Lesson 9 - Positioning And Layout
Lesson 10 - Flexbox
Headings in HTML allow you to create titles and subtitles, organising content into hierarchical sections. HTML offers six levels of headings, each denoted by the <h1>
to <h6>
tags:
<h1>
- This is the largest and most important heading.<h2>
- Slightly smaller than <h1>
, used for major sections of the page.<h3>
- Used for subsections within <h2>
sections.<h4>
, <h5>
, and <h6>
- Successively smaller headings, suitable for less significant divisions of content.<h1>This is a Heading 1</h1> <h2>This is a Heading 2</h2> <h3>This is a Heading 3</h3> <h4>This is a Heading 4</h4> <h5>This is a Heading 5</h5> <h6>This is a Heading 6</h6>
In this example:
<h>
tag defines a different level of heading.Understanding how to use headings effectively enhances readability and accessibility of your web content.