+ 2
In the try it yourself section the program doesn't have any <html> ,<head>,<body> starting and ending tags but it still works.
Any relevant explanation for this??
5 Answers
+ 6
Html specification tell browser to display any html content as well they can, even if invalid... This cause browser to correct code not providing the theorically mandatory basic structure, and add such content to an implicit valid html structure, inside the body part (root element of displayed content ^^)... even in browsers, not only in code playground ;)
+ 5
@4rontender: browsers are mandatory by html specifications to be clever and try clean invalid code...
+ 2
Those tags are used for the main page, the code section is just a part of that main page.
+ 2
Browser is clever and try clean your codeâș
+ 2
thank you everyone đđđ