Client side scripts are mostly used to increase and speed up site's interactivity with the users and to add dynamics to it. That is possible thanks to the fact that browsers cache the code once loaded and evoke it as necessary.
The <script> element is often used in the head section, but can be inserted in the body or even after the body element.
- id, class (<noscript>) (document-wide identifiers)
- lang (<noscript>) (language information), dir (<noscript>) (text direction)
- title (<noscript>) (element title)
- style (<noscript>) (inline style information)
- charset (character encodings)
- src (file URI)
- type (content type)
- defer (script parsing delay)
- onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (<noscript>) (intrinsic events)
HTML script element: