<script>
document.write('JavaScript put me here');
</script>
The above example demonstrates usage of the <script>
element.
The <script>
element allows you to add scripts to your HTML documents. JavaScript is the default script type, however, it could be any language. If the script is not JavaScript, you can provide the language by using the type
attribute.
Attributes supported by the <script>
element (on top of the global HTML attributes) are:
src
type
charset
async
src
attribute is used.defer
src
attribute is used.crossorigin
<samp>