Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Create Navigation with Lists

nav element

How do I create a <nav> </nav> element

2 Answers

Hey Connor,

all you have to do to create an element is use this structure:

<ELEMENT>XXX</ELEMENT>

So...

<

this simbol indicate that you are opening an element

ELEMENT

replace this name with the name of the element. For a list of element that you can use see the reference (this is just one of the easier: http://www.w3schools.com/tags/ )

>

This close the element declaration (not the whole element)

XXX

Instead of the xxx put what the element should contain, see examples at the bottom.

</ELEMENT>

Now it's time to close the element. Not all of them need to be closed. You'll learn the difference practising, so don't worry if seems difficult memorize that for now.

===================== NAV ELEMENT

You can create the nav element as every other elements. Just see the top of this message. It need to be positioned inside the

<header></header>

tags.

Here you can find the reference for the nav tag: http://www.w3schools.com/tags/tag_nav.asp

You'll find a lot of useful information.

===================== EXAMPLES:

<ul>
<li>List 1</li>
<li>List 2</li>
<li>List 3</li>
</ul>

<img src="http://somewhere.com" alt="Never forget to add the alt! ;)" />

<br />

<html>
</html> <!-- Yes, these are tags as well -->

<p>
Some normal text <b>some bold text inside normal text</b>
</p>
Krzysztof Kucharzyk
seal-mask
.a{fill-rule:evenodd;}techdegree
Krzysztof Kucharzyk
Front End Web Development Techdegree Student 4,005 Points

All you have to do is add nav after header:

    <header>
      <a href="index.html">
        <h1>Nick Pettit</h1> 
        <h2>Designer</h2>
      </a>
      <nav>
         <ul>
         </ul>
      </nav>
    </header>