HTML5: The body element is optional


You can omit the <body> and even the <html> element itself in HTML5. However if you want to use <body>'s onload event, you can replace it by window's onload event and assign the JavaScript function you want to call (when the document is loaded) as stated below: 

window.onload = function() { /* anonymous function directives */ };

Comments

Popular posts from this blog

Apple's evaluating a new JVM

Tuning ext4 for performance with emphasis on SSD usage