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

Just doing MASH the game. I duplicate her work and it says doctype has to be above the <head>??

I'm just starting the MASH game. HTML part first. Her example shows the head above doctype. When I do the worksheet checker says the head has to be within the doctype. Not above as shown. Still when I out the head on top I couldn't get it to work

index.html
<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>

2 Answers

Milan Pankhania
Milan Pankhania
3,734 Points

Doctype should always go first and shouldn't be in the <head> tag. This is how a standard page is marked up:

<!DOCTYPE html>
<html>
    <head>

    </head>
    <body>

    </body>
</html>

The h1 tag and p tag shouldn't be in the <head> either, does this help?

Edit: The question is asking you to delete elements that don't belong in the <head>, so the answer would be:

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

The instructions are to DELETE everything that doesn't belong. Consider the bummer message as information on what to delete.

Ahh geesh thanks! That helps a lot. Duh.