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

HTML Basics Forum

View Course » View Exercise

2319 points
57bd121a8369662abf0002ea_201442639
Submitted by
Todd
almost 5 years ago

1.2 Section error

a. Always put <!DOCTYPE html> on the first line. This tells the browser what language it's reading (in this case, HTML).
b. Always put on the next line. This starts the HTML document.
c. Always put on the last line. This ends the HTML document.

b. & c. NEEDS to be;

<body>

and

</body>

NOT the tags. OR: just close the tag or include the tags (open and close) and them closing tag like;

<!DOCTYPE html>
<body>
    <h1>Write whatever you want here.</h1>
</body>
</html>

1 vote

permalink

My code:

 <!DOCTYPE html>
<html>
What about this?
</html>

1210 points
Fb6f13fcbef596b703d337caf56196d0?s=140&d=retro
Submitted by
Joel.Miles925
almost 3 years ago


0 votes

permalink

You are right that the code needs to be defined at the beginning with <!DOCTYPE html> but on the second line you need to make a tag and then the tags and finnaly the tags. really all you need to do in this section thought is put is
<!DOCTYPE html>
(html)
What ever you want to say
and (html)

the parentheses stand for the < >. If i tried to type the real script it wouldnt show up

I hope I helped

239 points
50a93fa5a01a5ce63e000930_849838697
Submitted by
Ryan
almost 5 years ago

1 Comment

57bd121a8369662abf0002ea_201442639 Todd almost 5 years ago

Again, teaching people how to code correctly from the start only helps them write semantically, correctly-coded web documents. Skipping a tag simply because it makes life easy (which I fin hard to believe because taking the 0.5 s to type the body tag really isn't saving time) is steering people in the wrong direction. This should have been taught from the start.