Headings
In HTML Basics, you created an h1
element. h1
is one of six heading levels available in HTML. Headings are used to establish hierarchy within your web content.
So, h1
is the equivalent of the title of the current page and each of the following levels falls below that, much like a table of contents.
See the Pen HTML Headings by Angelique (@angeliquejw) on CodePen.
In the example above, you can see all six heading levels and, on the right, their default formatting in your web browser.
It’s important to note at this point that when you get into learning CSS, you’ll be able to make headings and any other HTML elements look the way you want in terms of spacing, font size, color, etc. While browsers apply default styles to HTML documents like what you see here, this should not limit you and should not change how you write your HTML.
CSS is used to adapt what a web page looks like; HTML is used to provide structure and meaning to your web content.
To be more clear: Just because you want text in your HTML document to be large does not mean you should use an h1
element. You should use an h1
element because the content it wraps is the title or subject of the web content.