oldoc63 / learningHTML

Learning HTML with Codecademy and GitHub
0 stars 0 forks source link

Main and Footer #66

Closed oldoc63 closed 2 years ago

oldoc63 commented 3 years ago

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.

oldoc63 commented 3 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.

oldoc63 commented 3 years ago
<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>
oldoc63 commented 3 years ago

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
oldoc63 commented 3 years ago
<footer>
  <p>Email me at leodoc@codecademy.com</p>
</footer>