HTML h Element: Main Tips
- HTML defines headings in a web document by using the six HTML heading elements from
<h1>
to<h6>
. - The text content of an
<h1>
element has a bigger font size than other heading tags. The size of the font decreases from<h1>
to<h6>
tags.

Pros Main Features
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable

Pros Main Features
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion

Pros Main Features
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Heading Elements
These HTML elements set headings in a document. The h1
element is the HTML tag for largest heading. You can use h1
for the main titles, h2
element for section titles, and h3
for smaller sub-sections.
Tip: the use of headings is highly recommended since search engines use them to index websites.
Example
<h1>Heading text - Level 1. Most Important Heading</h1>
<h2>Heading text - Level 2</h2>
<h3>Heading text - Level 3</h3>
<h4>Heading text - Level 4</h4>
<h5>Heading text - Level 5</h5>
<h6>Heading text - Level 6. Least Important Heading</h6>
Note: web browsers normally add top and bottom margins to the content for every heading tag in HTML. Also, they set their text content to a bolder font.
align
It sets the horizontal alignment of the heading elements.
Tip: HTML5 does not support align. You should use CSS text-align property instead.
Example
<h1 align="center">Random text - Level 1</h1>
<h2 align="right">Random text - Level 2</h2>
<h3 align="right">Random text - Level 3</h3>
<h4 align="justify">Random text - Level 4</h4>
<h5 align="left">Random text - Level 5</h5>
<h6 align="center">Random text - Level 6</h6>
Browser support

Chrome
All

Edge
All

Firefox
1+

IE
All

Opera
All

Safari
All
Mobile browser support

Chrome
All

Firefox
4+

Opera
All

Safari
All