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

912 points
Submitted by
Noah Lovelady-Allen
about 4 years ago

Why do we have to use <!DOCTYPE html><html></html>?

It renders whether or not we do it. The instructions say we have to include it, but the code works just fine without it.

2 votes


shows the computer that this document is using HTML.

Is just the starting and ending tags for html.

409 points
Submitted by
almost 4 years ago


53b7ea14548c352e3400116c_164074792 Noah Lovelady-Allen almost 4 years ago

Then why does the webpage work without them?

53653471631fe9696d002098_4143800 Angelblade almost 4 years ago

The main reason is that it is a container for all of the HTML elements and represents the root of the website. The only reason why it probably works without it is that you are using an HTML editor. If you don't do that on a normal page, then the code will not work.

Fb6f13fcbef596b703d337caf56196d0?s=140&d=retro Joel.Miles925 over 3 years ago

You are totally right.

-5 votes


I would guess that it is proper practice and some web browsers could possibly detect if it is not present and realize they are trying to open something in an unrecognized format.

968 points
Submitted by
about 4 years ago

1 Comment

53653471631fe9696d002098_4143800 Angelblade almost 4 years ago

Thats not it. I answered it below.