Skip to main content

HTML Guide

Stray start tag “script”.

A <script> start tag has been found in an unexpected place in the document structure. Check that the <script> section appears within the <head> or <body> sections.

Here’s an example of a script inserted in the head of the document:

<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
    <script>
      console.log("Hello from the head");
    </script>
  </head>
  <body>
    <p></p>
  </body>
</html>

Learn more:

Related W3C validator issues