+ 1

Is the code <html></html> needed to start and end?

Is the code <html></html> needed to start and end a bunch of html code?

10th Oct 2017, 11:00 PM
Orson
3 odpowiedzi
+ 4
One HTML document mandatory has: <!DOCTYPE html> <html> <head> </head> <body> </body> </html>
10th Oct 2017, 11:17 PM
Trưởng Nguyễn
Trưởng Nguyễn - avatar
+ 1
(edited to be more clear) To be a valid document, you'd better include them. To render... [edit] documents won't validate, but most browsers -- including the one embedded in SoloLearn -- will guess what you meant to do and fill it in. Because the browser guesses at bad markup (vs. halting a script), you may end up in 'quirks mode' or accidentally affect security. For example, something on SoloLearn injects some structure elements (this is nice), but it appears to affect Javascript DOM functions. None of this should really get in the way of learning to code... in fact quirks may help you learn; just be aware that you shouldn't rely on automatic behaviors -- because occasionally they bite.
10th Oct 2017, 11:47 PM
Kirk Schafer
Kirk Schafer - avatar
0
yes
10th Oct 2017, 11:10 PM
Joshua
Joshua - avatar