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

CSS How to Make a Website Styling Web Pages and Navigation Style the Portfolio

</body> & </html> broken

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Thiago Patriota | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:600italic,700italic,400,700,600,800' rel='stylesheet' type='text/css'>
      <link rel="stylesheet" href="css/main.css">
   </head>

<body>

    <header>
      <a href="index.html" id="logo">
        <h1>Thiago Patriota</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul>
          <li><a href="index.html" class="selected">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
        </nav>
    </header>
    <div>
      <div id="wrapper">
          <section>

            <ul id="gallery">
              <li>
                <a href="IMG/numbers-01.jpg">
                  <img src="IMG/numbers-01.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>

              <li>
                <a href="IMG/numbers-02.jpg">
                  <img src="IMG/numbers-02.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>


              <li>
                <a href="IMG/numbers-06.jpg">
                  <img src="IMG/numbers-06.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>

              <li>
                <a href="IMG/numbers-09.jpg">
                  <img src="IMG/numbers-09.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>              
            </ul>
          </section>
          <footer>
            <a href="http://twitter.com/nickrp"> <img src="IMG/twitter-wrap.png" alt="Twitter Logo"> </a>
            <img src="IMG/facebook-wrap.png" alt="Facebook Logo">
            <p>&copy; 2014 Thiago Patriota.</p>
          </footer>
      </div>
      </body>

  </html>

You have the closing tags for body and html but no opening tags. Wrap the entire document in the html tags and add an opening body tag after the stylesheet link

3 Answers

Hi Thiago,

You appear to have an unclosed DIV in your markup which is redundant and can be removed, I'm referring to the following.

<div> <!-- Remove this line -->
  <div id="wrapper">

As for your CSS you appear to have something unclosed further up in your code, without been able to see it I would assume you have an unclosed curly brace somewhere.

Also for future reference see the below for information about posting code to the forum, I've fixed your above posts so they correctly display now.

https://teamtreehouse.com/forum/posting-code-to-the-forum

Thanks Chris and Jeremy! I just solved both of them, i'll post the code correctly in the future questions.

Hey Jeremy, actually i have. This is the entire code, but both </HTML> and </BODY> are red as broken

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Thiago Patriota | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:600italic,700italic,400,700,600,800' rel='stylesheet' type='text/css'>
      <link rel="stylesheet" href="css/main.css">
   </head>

<body>

    <header>
      <a href="index.html" id="logo">
        <h1>Thiago Patriota</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul>
          <li><a href="index.html" class="selected">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
        </nav>
    </header>
    <div>
      <div id="wrapper">
          <section>

            <ul id="gallery">
              <li>
                <a href="IMG/numbers-01.jpg">
                  <img src="IMG/numbers-01.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>

              <li>
                <a href="IMG/numbers-02.jpg">
                  <img src="IMG/numbers-02.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>


              <li>
                <a href="IMG/numbers-06.jpg">
                  <img src="IMG/numbers-06.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>

              <li>
                <a href="IMG/numbers-09.jpg">
                  <img src="IMG/numbers-09.jpg" alt="">
                  <p>Experimentation with color and texture.</p>
                </a>
              </li>              
            </ul>
          </section>
          <footer>
            <a href="http://twitter.com/nickrp"> <img src="IMG/twitter-wrap.png" alt="Twitter Logo"> </a>
            <img src="IMG/facebook-wrap.png" alt="Facebook Logo">
            <p>&copy; 2014 Thiago Patriota.</p>
          </footer>        
      </div>

   </body>

  </html>

It may be that not everything is copied in for me to examine because this time the closing /body tag disappeared. From what you are saying you do have a <html> and </html> tags wrapping the entire document plus <body> and </body> wrapping the elements?

i cant seem to be able to paste everything, i took screenshots Jeremy!

html css

the lines 28 & 29 are just repeating in the screenshot, so it's not a mistake on the coding