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 trialJoe Seager
166 PointsBasic list element not working
Hi there
Just trying to add three basic list elements to my code (extreme beginner, as you can probably tell). Please cold someone help me out with why it isn't working? Thank you.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>Portfolio</ul>
<ul>About</ul>
<ul>Contact</ul>
</nav>
</header>
<section></section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
4 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHi Joe,
We were all "beginners" at one point. :)
It is because you are using the wrong tags to create your list. You are using <ul> for the list elements. UL stands for "Unordered List" and the opening tag is used to tell the document that you are starting an Unordered List.
The items in the list will be surrounded by <li> tags. LI stands for "List Item." So, the list items go between the list type. In your case, the li tags for your list go between opening and closing ul tags:
<nav>
<ul>
<li>Portfolio</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
Hope that makes sense. Keep Coding! :)
Andrew Rodman
9,681 PointsMake sure to wrap your list items inside of an un-ordered list!
Joe Seager
166 PointsWow I am dumb. Thanks Andrew!
Joe Seager
166 PointsThanks Jason. Can you tell I'm on my free trial?
Andrew Rodman
9,681 PointsNo worries Joe! I am too...
Jason Anders
Treehouse Moderator 145,860 PointsNo worries. It wasn't that long ago I was as well.
A pointer for the forum... if/when an answer satisfies your question completely, could you mark it "Best Answer" as this lets others in the forum know that your question was resolved. Up-voting is a great way to show you appreciate other contributions as well.
And, HAPPY CODING in your endeavor! :)