+ 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

7th May 2019, 8:37 PM
Cheese Burger Joe
Cheese Burger Joe - avatar
6 Answers
+ 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.
7th May 2019, 8:44 PM
Basel.Al_hajeri?.MBH()
Basel.Al_hajeri?.MBH() - avatar
+ 8
Some browsers maybe more forgiving than others.
7th May 2019, 11:21 PM
Sonic
Sonic - avatar
+ 4
For example: Why you see by two eyes,one eye can do everything alone. 😉
7th May 2019, 8:47 PM
Basel.Al_hajeri?.MBH()
Basel.Al_hajeri?.MBH() - avatar
+ 1
They have more important then you imagine
7th May 2019, 8:41 PM
Basel.Al_hajeri?.MBH()
Basel.Al_hajeri?.MBH() - avatar
+ 1
That is related with DOM.
9th May 2019, 4:40 AM
Marcos Bernardino da Silva
Marcos Bernardino da Silva - avatar
0
html and body tags are both the main tags to build a webpage
14th May 2019, 8:17 PM
William