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 HTML First Use HTML Elements

Martin Barron
Martin Barron
8,478 Points

Hey. Sorry I can't see what iv done wrong on this page. Can you help?

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Martin Portfolio<title>
</head>
<body>
  <header>
      <h1>Martin Barron</h1>
      <h2>Does<h2>
  </header>
  <section> 
      <p>Gallery goes here</p>
  </section>
  <footer> 
      <p>&copy; Martin Barron. </p>
  </footer>
</body>
</html>

Hey Martin,

could you please post the code as you see it in the editor? I believe what you posted is the output you see in the browser, right?

3 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You didn't close the title tag. Just add the / in the second <title> tag. Do the same for the h2. Your code corrected:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Martin Portfolio</title>
</head>
<body>
  <header>
      <h1>Martin Barron</h1>
      <h2>Does</h2>
  </header>
  <section> 
      <p>Gallery goes here</p>
  </section>
  <footer> 
      <p>&copy; Martin Barron. </p>
  </footer>
</body>
</html>
Martin Barron
Martin Barron
8,478 Points

Two tags not closed and I really thought I'd managed to outsmart the system!

Thank you all very much for your help!

Steven Griffiths
Steven Griffiths
3,165 Points

I recommend closing the tag immediately after opening it.

So for example, you type this first

<title></title>

Then you move the cursor in between the tags and type your content.

<title>Martin Portfolio</title>

I used to stare at the screen for ages wondering what was wrong with the code and get very frustrated. Doing this will save a lot of time and wasted energy shouting at your computer screen!