HTML & CSS
/Beginner
Headings
Definition
HTML elements `<h1>` through `<h6>` used to define the headings of a page, representing a hierarchy of importance.
Explain Like I'm New
Headings are the titles and subtitles of your webpage, exactly like an outline for an essay. `<h1>` is the main title of the page (you should only have one!). `<h2>` are the major sections, and `<h3>` are subsections within those.
Real World Example
A news article. The headline is `<h1>`. The main sections of the article are `<h2>`. If a section has bullet points with titles, those are `<h3>`.
Common Use Cases
- •Structuring document hierarchy
- •SEO (Google reads headings to understand the page)
Interactive Example
Interview Questions
basic
- Which heading tag is the largest and most important?
intermediate
- Why shouldn't you use an `<h2>` just to make text bold and big?