Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website HTML First Create the Content Containers

My Webpage is not displaying the same

I have followed this video from the beginning. When i preview my code my webpage doesn't display correctly. Here is my code. What have i done wrong.

<!DOCTYPE html>
<html>
  <head>
    <meta charsets="utf-8">
    <title>I've been there | Me too</title>-->
  </head> 
  <body>
    <header> 
      <h1>so have i</h1>
      <h2>and meeeeee toooo</h2>
    </header>
   <section>
    <p>Gallery will go here.</p>
    </section>
    <footer>
    <p>&copy; RealPlaces.com</p>
    </footer>
  </body>
  </html>

8 Answers

Kevin, working from top:

-meta charsets should be -meta charset -closing title tag- shouldn't have a comment tag at the end of it -->

Hope that helps. Good luck. :-)

lordcozycat
lordcozycat
11,940 Points

As Warren said, you have a few mistakes in your code, so try to fix those and see if your page has any changes.

Without a screenshot or a description of how your page looks different, I'd have to guess that maybe you're using a different browser, and that's why the page is looking different. Could you go into more detail about how your page is not displaying the same?

Hi Guys,

I have watched the Tutorial again and here is my code now,

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>I've been there | Me too</title> </head> <body> <header> <h1>so have i</h1> <h2>and meeeeee toooo</h2> </header> <section> <p>Gallery will go here.</p> </section> <footer> <p>© RealPlaces.com</p> </footer> </body> </html>

This is the page I get,

http://web-m1alqd16z8.treehouse-app.com/

lordcozycat
lordcozycat
11,940 Points

Do you land on a page with "Index of ../", Kevin, and if so, is that the difference you're talking about?

open an html element after your doctype, and inside that add your head, body, etc.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>I've been there | Me too</title> </head> <body> <header> <h1>so have i</h1> <h2>and meeeeee toooo</h2> </header> <section> <p>Gallery will go here.</p> </section> <footer> <p>© RealPlaces.com</p> </footer> </body> </html>

have I not opened an html element by <html></html>?

it says index of testing.html which is the name of my file

lordcozycat
lordcozycat
11,940 Points

That seems to be a bug with Workspace Previews right now. Don't worry about it, just click through to your HTML file and the proper page will load. So is that the issue you were talking about then?

yes it is.....so i'm not doing it wrong after all :) Thanks Bryan and everyone else for your comments and help. I can carry on learning now :)