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

Tuning ext4 for performance with emphasis on SSD usage

Java 8: Default Interface Implementations, The Diamond Problem, Multiple Inheritance, and Precedence

Tuning ext3 for performance without losing its data integrity potential