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

JavaScript Treehouse Club - MASH MASH - HTML Thinking With Your Head

html

i dont understand this object

index.html
<head>

  <h1 charset="utf-8">
  <h1>Futuristic MASH</h1>
  <h1>Futuristic MASH</h1>
  <h1 href="style.css" rel="stylesheet"</h1>
  <h1> Directions to play the game: </h1>
 </head>

1 Answer

Ryan Dudley
Ryan Dudley
Treehouse Project Reviewer

The question asks you to remove the HTML elements that do not belong within the <head> tag. The head tag is for adding things like document title, CSS, and meta information (such as charset, viewport, things like that.)

The question initially gives you this :

<head>
  <!DOCTYPE> 
  <meta charset="utf-8">
  <title>Futuristic MASH</title>
  <h1>Futuristic MASH</h1> 
  <link href="style.css" rel="stylesheet">
  <p> Directions to play the game: </p>
</head>

There are a couple of problems with this, as there are a couple of elements that are intended to be used in the body, generally associated with some kind of content (h1, and p.) Also the DOCTYPE should be declared at the top of the html file, not within the <head> tag.

So after removing the non meta-data elements from the <head> tag, it should look something like this :

<!DOCTYPE>
<head>
  <meta charset="utf-8">
  <title>Futuristic MASH</title>
  <link href="style.css" rel="stylesheet">
</head>

Also, in your code example it appears you have changed all the elements to h1 tags, which won't work. Be careful there, and be sure you only use the charset attribute with the <meta> tag. It appears you have also changed the <link> tag to an h1 as well, which is incorrect. The link tag is telling the browser the relative file path to your css file using the href attribute, which is not meant to be used with an h1 element. Lastly, the title tag is used to define the document title of the HTML page, and is required. So just make sure you add that back following the example above and you should be good to go!

Hope this was of some help to you.