Whats the point of <html> and <body>? | Sololearn: Learn to code for FREE!


Whats the point of <html> and <body>?

I decides to try something, I made a code that only had <!DOCTYPE html> and the text "Hello" and it succesfully output-ed. If we don't need them why include them. Edit: I only put those in the code once, so I may have missed something small/big that I didnt try

5/7/2019 8:37:33 PM

Cheese Burger Joe

6 Answers

New Answer


Maybe here will be successful but <html> is the root tag how to build your website without the root ,and <!DOCTYPE html> to support many things in HTML 5 ,and some browsers will not accept your website without them and <head> <body> . When you read more about them you will see importance for them.


Some browsers maybe more forgiving than others.


For example: Why you see by two eyes,one eye can do everything alone. 😉


They have more important then you imagine


That is related with DOM.


html and body tags are both the main tags to build a webpage