Why won't it let me past?


#1

I'm onto Lesson 3 of Build your own web page and It says "Create an <h1> tag inside your body tags. Between your opening <h1> and closing <*/h1> tags, type your name for all to see!" and my coding is:

<!DOCTYPE html>
<html>
<head>
<title>
<body>
    <h1>Owen</h1>
</body>
</title>
</head>
</html>

Yet I get the message saying "Oops, try again. Make sure you put in

tags between your tags." which is what I've done. Can someone please let me know why it isn't working. Thanks

#2

For start, can you show the code?


#3

Your nesting is wrong, you should close the head tag (<head>) before you start your body, and should close your title before you close your head, this way your page is divided in two sections: head and body

@betarunner23820, he did post his code, but without format, so it was not visible.

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#4

Body goes outsde the title and head tag.

    <head>
    <title> My first website </title> 
    </head>
    <body> 
    <h1> Owen </h1>
    </body

#5

Thank you @stetim94, I couldn't see his code but I can see it now. And thank you for explaining formatting the code in comments a bit, I found it a bit hard to use.

@chiprunner05223, you have wrong structure. <head> should contain <title>, but <body> should be separated from <head>. You can always refer to w3schools (here is basic HTML structure).


#6

benjnev, hello.

On the previous lesson I did as chiprunner05223, and I passed?

Why should title be open and closed before now? Can you explain it?

Thanks


#7

Your code is not visible. Because your title is not suppose to show up on the webpage, it is suppose to show up in the browsers tab, but it won't because CC uses an iframe, you can see it working on jsbin or even better on a local html file on your computer (create it with a text-editor)