Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
IMCreator - Free Website Builder

HTML script Tag

The information on this page is based on HTML version 4.01 (which is the current version of HTML). The next version, HTML 5, is currently being written. Here's a list of HTML 5 tags.

The HTML script tag is used for declaring a script (such as JavaScript) within your HTML document.

Also see the HTML noscript tag for providing content to browsers that don't support your scripting language.

Example
<script type="text/javascript">
  document.write('The HTML Script tag allows you to place a
                    script within your HTML documents');
</script>
Attributes:
Attributes specific to this tag:
AttributeDescription
nameDefines the name of the parameter.
srcSpecifies a URI/URL of an external script.
typeSpecifies the scripting language as a content-type (MIME type).
languageSpecifies the scripting language, however, this attribute has been deprecated. Use the type attribute instead.
deferDeclares that the script will not generate any content. Therefore, the browser/user agent can continue parsing and rendering the rest of the page.
Other Attributes:
AttributeDescription
charsetDefines the character encoding that the script uses.
Try it yourself!


Also see the HTML 5 version of HTML tags

Enjoy this page?

  1. Link to this page (copy/paste into your own website or blog):
  2. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!