- What does
Empty or Not?
<script> element has two potential uses. It can define a section of the page written in a scripting language other than HTML. It can also import a script from an external file. In the latter case, the
<script> element must have no content.
By default, the browser will load and run the script while the rest of the content is loading. You can control this using the
defer attribute, which forces the browser to finish loading the page first.
Browser Support for script