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

+3

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

+4

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.

+8

Some browsers maybe more forgiving than others.

+4

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

+1

They have more important then you imagine

+1

That is related with DOM.

0

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