Headers
In this lesson, we'll learn how to add headers in our HTML page. Let's begin! :)
We'll cover the following...
There are two ways you can use headers in HTML5:
-
First, the header can be used as the title of your web page.
-
Second, you can use a header as a title of some content. In this context, you can have multiple headers, each associated with its related content.
You can even combine these aspects, so on a web page, you may apply a single header for the page and multiple headers for separate content sections.
In Listing: The skeleton of an article with HTML5, the <header>
tag was used as a content-related header. It was nested into the <article>
tag, as this code snippet shows:
Press + to interact
<body><article><header><h1>Visual Studio Platform and Extensibility</h1><p class="byLine">by Istvan Novak</p></header><!-- ... --></article><!-- ... --></body>
If it were a page ...
Access this course and 1400+ top-rated courses and projects.