Closed oldoc63 closed 2 years ago
The element <main>
is used to encapsulate the dominant content within a webpage. This tag is separate from the <footer>
and the <nav>
of a web page since these elements don’t contain the principal content. By using <main>
as opposed to a <div>
element, screen readers and web browsers are better able to identify that whatever is inside of the tag is the bulk of the content.
<main>
<header>
<h1>Types of Sports</h1>
</header>
<article>
<h3>Baseball</h3>
<p>
The first game of baseball was played in Cooperstown, New York in the summer of 1839.
</p>
</article>
</main>
The content at the bottom of the subject information is known as the footer, indicated by the <footer>
element. The footer contains information such as:
Contact information
Copyright information
Terms of use
Site Map
Reference to top of page links
<footer>
<p>Email me at leodoc@codecademy.com</p>
</footer>
Two more structural elements are
<main>
and<footer>
. These elements along with<nav>
and<header>
help describe where an element is located based on conventional web development standards.