Script Element Between Head and Body. [closed]
When validating with W3C, I received the response:
script element between head and body. [HTML5]
How is this specific to HTML5 versus regular XHTML validation?
<!doctype html> <html> <head> <meta charset="UTF-8"> <title></title> <link href="services.css" rel="stylesheet" type="text/css"> <script></script> </head> <body> <div id="container"> <div id="header"> </div> <div id="body"> </div> <div id="footer"> </div> </div> <script></script> </body> </html>
You placed your scripts on an invalid spot.
You should place them within head or body tags. Every time you can, put them at the end of the body. This is to avoid blocking html rendering while dowloading scripts, improving site responsiveness.
The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an HTML document.