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 HTML Basics Structuring Your Content Structuring Content Challenge

Marking Up a Blog Post

I Can't Understand Where to place ul , h1 and p tags

index.html
<!DOCTYPE html>
<html>
  <head>
    <link href="styles.css" rel="stylesheet">
    <title>My Portfolio</title>
  </head>
  <body>

    <ul>
      <li><a href="#">About</a></li>
      <li><a href="#">Work</a></li>
      <li><a href="#">Contact</a></li>            
    </ul>
    <h1>My Web Design &amp; Development Portfolio!</h1>
    <p>A site featuring my latest work.</p>


    <h2>Welcome</h2> 

    <p>Fusce semper id ipsum sed scelerisque. Etiam nec elementum massa. Pellentesque tristique ex ac ipsum hendrerit, eget feugiat ante faucibus.</p>
    <ul>
      <li><a href="#">Recent project #1</a></li>
      <li><a href="#">Recent project #2</a></li>
      <li><a href="#">Recent project #3</a></li>     
    </ul>

    <p>&copy; 2017 My Portfolio</p>
    <p>Follow me on <a href="#">Twitter</a>, <a href="#">Instagram</a> and <a href="#">Dribbble</a></p>
  </body>
</html>

2 Answers

Your question does not make any sense but I will give it a guess anyway... If you meant that you don't understand where a (h1) and (ul) and (p), should be inserted when creating a webpage then you need to understand that the (h1) tag can be place anywhere inside the (body) tag. But the (h1) tag is use only once per webpage, this has become the living standard between the development community. Of course you can use more than one (h1) tag on your webpage but any would be developer will rip you apart. The heading level one (h1) tag is use to title a page like a book tittle or a chapter title, of course there is more than one heading level there is six in total. As tradition most web developers using only up to heading level four (h4), because you can target these headings level via (Css) and change their default browser font-size. Looking at your example above you did well using (h1) then (h2).

As for the (ul) and (p) tag you can use them as you did in your code example, inside the body tag. your code is valid. I believe you need to learn more about semantic markup and structuring your website. Don't worry many developers have reached this problem of not knowing when to use a given tag. The (ul) on top of your code could be wrap inside a (nav) tag to indicate it is the main site navigation. But that seems a bit of your current skill level. Keep watching the html track and you will understand how and when to use tags and the semantic meaning of html5 elements.

Taylor Han
Taylor Han
3,701 Points

Hi Rahul,

This question is asking to place the ul, p, and h1 tags inside an element that specifies it is introductory content, which is the <header> element.

So you're not really "moving" these tags per say, but rather placing a <header> above the first ul tag, and a </header> after the last one.

<header>

<ul> <li><a href="#">About</a></li> <li><a href="#">Work</a></li> <li><a href="#">Contact</a></li>
</ul> <h1>My Web Design & Development Portfolio!</h1> <p>A site featuring my latest work.</p> </ul>

</header>

So the answer to this challenge will look like this. Hope this helps!

Taylor Han
Taylor Han
3,701 Points

Also I copied and pasted the code so it got a little messed up, but hopefully you get what I mean haha