/    Sign up×
Reference /Pin to ProfileBookmark

<h1> – <h6>

The h1 to h6 tags, or Heading elements, define HTML headings, with <h1> being the most important and <h6> being the least.

Syntax

Heading elements should not be used to resize text. This should be done using CSS instead. There should only be one <h1> tag per page, and heading levels should not be skipped. Use <h1>, then <h2>, and so on.

<article>
  <h1>This is the main title</h1>
  <p>This is some content.</p>
  <h2>This is a secondary heading</h2>
  <p>This is some additional content.</p>
  <h3>And another, smaller heading</h3>
  <p>This is some more additional content.</p>
</article>

Browser Compatibilty

Demos

User-submitted codepen.io examples of <h1> – <h6>

@steime

See the Pen on CodePen.

Want to Contribute?

Submit a codepen.io link that demonstrates <h1> – <h6>:

to submit a demo.
HTML
×

Success!

Help @reference spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 2.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,

tipper: @neststayhome,
tipped: article
amount: 1000 SATS,
)...