Question about the <html>



Hi folks, I’m new here and am glad for such a resource that allows people to teach and empower themselves.

I know to some people, this is going to be a stupid question but according to the tutorial:

“If you don’t use the doctype declaration, your HTML code will likely still work, however, it’s risky. Right now, the browser will correctly assume that you are using HTML5, as HTML5 is the current standard. In the future, however, a new standard will override HTML5. Future browsers may assume you’re using a different, newer standard, in which case your document will be interpreted incorrectly. To make sure your document is forever interpreted correctly, always include at the very beginning of your HTML documents.”

How are browsers going to tell if you are using HTML 5 or newer versions from if there is no visible indication from the code that a person is using HTML5 or such?

How can browsers make out what version of HTML a person is using (I hope that makes sense).

Sorry again for the stupid question.


well, someone clever coded that html5 should be used by default if not doctype declaration is used.

<!DOCTYPE html> is html5, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ""> is html4.

so the doctype determines the version of html which is used, if there isn’t one, browsers will fall back to the default doctype (which is coded into the browser)


How do you code and does it hlep me do something .


you can just follow the lessons? It gives you access to an editor in which you can write, in today’s digital world, coding is a valuable skill to have.


Thanks for the explanation