+ 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?
3 Respuestas
+ 4
One HTML document mandatory has:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
+ 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.
0
yes