HTML4 Reference

HTML <script> tag


The <script> tag and it's closing </script> tag define a scripting language within the HTML document.


<html  xmlns="">
  <title>Appears in browser toolbar, favourites and search engime results.</title>

  <script type="text/javascript" src="../js/jquery.js"></script>



Required Attributes

type specifies the MIME type of a script.

  <script type="text/javascript" src="../js/jquery.js"></script>

Optional Attributes

defer - limited browser support - specifies execution of the script is delayed until the page has loaded.

charset specifies the character set of the linked document.

  <script type="text/javascript" charset="ISO-8859-1"></script>

src specifies the URL location of the external script.

  <!-- relative URL to this document -->
  <script type="text/javascript" src="../js/jquery.js"></script>

  <!-- Absolute URL -->
  <script type="text/javascript" src=""></script>

Common Attributes


Language Attributes


Event Attributes


<samp> tags    << Prev          Next >>  <select> tag

go to home page Homepage go to top of page Top