This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Build Your Own Webpage Forum

View Course » View Exercise

247 points
Bbdde78c4d93f141e6f397234f145881?s=140&d=retro
Submitted by
Rush187
over 4 years ago

Header Tags not recognized within Body tags

I keep receiving the error "Make sure you put your tags between your tags. Here is my code. Any help is appreciated as this seems straight forward. Thanks in advance.

<!DOCTYPE html>
<html>
    <head>
        <title>
            <body>
                <h1>Hello World</h1>

            </body>

        </title>

    </head>

</html>

3 votes

permalink

Hello Rush187,

Two main section in your html page: HEAD and BODY.
Anything you write in the read is to be viewed by machines.
The title is actually a piece of information for machines to read, nothing to do with any title we paint on the screen.

Both HEAD and BODY co-exist as siblings, like parallel to each other.
In your case the BODY is inside of HEAD and also inside of TITLE..
What to do?
1- Leave the title by itself in the HEAD
2- Bring the whole BODY (including h1) bellow the HEAD.
Let's see if you pass after that radical operation.
Let me know.

2946 points
5533b41186f55278520000c6_295543857
Submitted by
tony de araujo
over 4 years ago

6 Comments

5147247bda99f038db005f59_600419972 Sarah-Kate DuRant over 4 years ago

could you show an example, im so confused

Bbdde78c4d93f141e6f397234f145881?s=140&d=retro Rush187 over 4 years ago

Hi Sarah-Kate,
The problem I had is that the tags should have been outside of the tags.

<!DOCTYPE html>


This is my title!

Hello World

Check my original example to see the error. Let me know if this helps.

5147247bda99f038db005f59_600419972 Sarah-Kate DuRant over 4 years ago

ok how do I copy my code to show you? ive been trying to copy the code forever

Bbdde78c4d93f141e6f397234f145881?s=140&d=retro Rush187 over 4 years ago

I was able to copy my code into a new forum question but not into one of these reply windows. I would tell you to e-mail me but I don't want to post my address. I guess you should just type it in and format it.

51d9186152f86340ea0393a8_510769226 Paul Smith over 4 years ago

thanks a lot :)

545765dc7c82ca11f0007b0f_597344380 sam over 2 years ago

That worked for me.


0 votes

permalink

the closing title tag should be right after the title, and the closing head tag should be right after closing title tag

372 points
Picture
Submitted by
Mo Go
over 4 years ago


0 votes

permalink

Thanks for the advice. Everything is now in working order.

247 points
Bbdde78c4d93f141e6f397234f145881?s=140&d=retro
Submitted by
Rush187
over 4 years ago


0 votes

permalink

2946 points
5533b41186f55278520000c6_295543857
Submitted by
tony de araujo
over 4 years ago