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

how to add a title element to the page

How do I add a title element to the page?

I thought it looked something like this:

<head>David Someone | Expert</head>

but the the challenge task is insisting it is not...

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
  David Miranda | Expert</head>
  <body>
    <header></header>
    <section>
      <p>Gallery will go here.</p>
    </section>
    <footer></footer>
   <h1>David Miranda</h1>
  </body>
</html>

3 Answers

Chris Higgins
Chris Higgins
6,813 Points
<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <title></title>
  </head>
  <body></body>


</html>

You add the ' title ' Element in the ' head ' part of the document.

The title tag should go inside the head tag.

<head>
  <meta charset="utf-8">
  <title>  David Miranda | Expert </title>
</head>

Thank you Chris! It took me a minute to realize the order of things but I'm catching on.