---
tags:
  - html
  - web
---
Default type: javascript. Can specify `type` with a mimetype of alternate script language. `type="module"` for javascript modules.

Place scripts at the end rather than at the start, unless [DOMContentLoadedEvent](https://developer.mozilla.org/docs/Web/API/Document/DOMContentLoaded_event) is used. 
- Javascript can't reference elements that don't yet exist
- Browser blocks rendering, and halts downloads etc until js finishes execution

`<script defer>` dont block while downloading, execute js after rendering
`<script async>` dont block while downloading, execute js when download finished, pausing renderer until js completes