Require end tag for <script> element
- Rule ID:
- script-element
- Category:
- Content model
- Standards:
- HTML5
For legacy reasons the <script> element must include a </script> end tag even when using the src attribute.
Rule details
Examples of incorrect code for this rule:
<script src="myscript.js"/>
Examples of correct code for this rule:
<script src="myscript.js"></script>