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 CSS: Cascading Style Sheets Use ID Selectors

Daniel Shapira
PLUS
Daniel Shapira
Courses Plus Student 1,590 Points

Div does not clos properally

when i whrite </div> the </body> tag switches to white but the </html> stays red

          <p>    <!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Beny Fleshler | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">
  <body>
    <header>
      <a href="index.html">
        <h1>Benny Fleshler</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul>
            <li><a href="index.html">Portfolio</a></li>
            <li><a href="about.html">About</a></li>
            <li><a href="contact">Contact</a></li>
        </ul>
      </nav>
    </header>
    <div>
      <section>
        <ul>
        <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>Blending modes in photoshop</p>
            </a>
         </li>     
          <li>
          <a href="img/numbers-06.jpg">
             <img src="img/numbers-06.jpg" alt=""> 
              <p>80s style glows</p>
            </a>
         </li>      
          <li>
          <a href="img/numbers-09.jpg">
             <img src="img/numbers-09.jpg" alt=""> 
              <p>Drips with photoshop brusher</p>
            </a>
         </li>      
          <li>
          <a href="img/numbers-12.jpg">
             <img src="img/numbers-12.jpg" alt=""> 
              <p>random work</p>
            </a>
         </li>
        </ul>
      </section>
      <footer>
        <a href="http://twitter.com/pkakr"><img src="img/twitter-wrap.png" alt="twitter logo"></a>
        <a href="http://facebook.com/pkakr"><img src="img/facebook-wrap.png" alt="facebook logo"></a>
        <p>&copy; 2016 Beny Fleshler.</p>
      </footer>
      </div>
    </body>
</html>
</p>
          ```

```css
a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding:0 5%;
  background: orange;
}
Nursultan Bolatbayev
Nursultan Bolatbayev
16,774 Points

Could u provide ur code and whats wrong there?

2 Answers

Tanja Schmidt
Tanja Schmidt
11,798 Points

Hi Daniel, you've missed to close your <head>-element at the top of your file, right above your opening <body>-tag. Try to add it as below and you should be fine. If not, please write back. :)

<head>
    <meta charset="utf-8">
    <title>Beny Fleshler | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">
</head>
<body>
Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

The first thing I've spotted is you've wrapped your entire HTML document in a paragraph element which is not necessary or valid HTML. It may be confusing the browser and causing it to display the wrong colour.

The rest of the code looks fine so try removing those paragraph elements and have a look at what changes. :-)

Daniel Shapira
Daniel Shapira
Courses Plus Student 1,590 Points

the <p> element does not exist in the real code i thought i need to put it here to post the code

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

No problem,

It's not needed so they can be safely removed.

Would you be able to post your CSS code so we can see if there's something in your CSS that's causing the problem? :-)

You can post code with 3 backticks like this ` using markdown