HTML Academy
The section tag, which is used for semantic sections
HTML document structure8/19
Back to the list of tasks
  • 1. The HTML doctype, or document type declaration
  • 2. Basic HTML tags
  • 3. The head tag, which provides metadata information about the page
  • 4. The title tag for page titles
  • 5. The main tag for main content
  • 6. The header and footer tags
  • 7. The section tag, which is used for semantic sections
  • 8. The nav tag, which is used to specify the main navigation
  • 9. The article tag, which is used to indicate an independent section
  • 10. The aside tag, which is used to specify additional content
  • 11. The h1-h6 and title tags in HTML
  • 12. The p tag for paragraphs
  • 13. Let’s finish designing our pages
  • 14. The meta tag, which is used for page character encoding
  • 15. The meta tag, which is used for keywords
  • 16. Let’s connect another frame to the page
  • 17. Summary of “HTML document structure”
  • 18. First challenge
  • 19. First mastery challenge
The article tag, which is used to indicate an independent section
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

The nav tag, which is used to specify the main navigation

Do you remember the assignment that you received from Instructor Muffin? We are developing a website with a homepage and blog entries. Therefore, we need to provide a navigation block on the main page that can be used to navigate to certain blog posts.

To create a logical section of site-wide navigation, use the <nav> tag (which is an abbreviation for “navigation”). Usually <nav> includes links to other pages or navigation elements for the current page. Example:

<nav>
  First post, second post and post archive
</nav>

We will cover links in the following chapters. For now, let’s add the navigation section on the main page. This section will be unique to the main page and will not be repeated on other pages. Therefore, we will place it in the main content.

Not every group of links on a page should be enclosed in <nav> tags. For example, a small block with supporting links can be inserted in the website footer. This block inside the <footer> tag should not be additionally enclosed in <nav> tags.

In addition, the <nav> block in addition to the links may include paragraphs with text, headings, lists and other content.

Comments

  • index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <title>The website of a beginning coder</title> <link rel="stylesheet" href="outlines.css"> </head> <body> <header> Website header </header> <main> <section> Greetings to everyone! Welcome to my first site. Up until just recently I had no idea what a coder does for a living, but now I have found interactive courses in HTML and CSS and I have set myself the goal of becoming one. I even was assigned an instructor, Muffin, who does not allow me to slack off and will track my progress. My first assignment is to keep a diary and honestly write about all of my accomplishments. </section> <section> Skills section </section> </main> <footer> Website footer </footer> </body> </html>

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Add the <nav> tag with the text Navigation before the first “section” inside <main>.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.