Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


SCRIPT

The SCRIPT element places a script within the document and may appear within the HEAD and/or BODY of the document any number of times.

src
The src attribute specifies the location of an external script.
type
The type attribute specifies the scripting language as 'content type' such as "text/javascript".
language
The language attribute has been deprecated in favor of type. It specifies the scripting language.
Deprecated:
<Script language="JavaScript">
</Script>
HTML 4.0
<SCRIPT type="text/javascript">
</SCRIPT>
defer
The defer attribute tells the user agent that the script is not going to contain any document content. For example, it will not contain a "document.write" in javascript. This allows the user agent to continue parsing and rendering.
The scripting language must be specified either through a default declaration in the document HEAD or through a local declaration.

Within the HEAD
<HEAD>
<TITLE>Hello World Script</TITLE>
	<META http-equiv   = "Content-Script-Type"
		  content  = "text/javascript">
</HEAD>
Within the BODY
<SCRIPT type="text/javascript">
<!--
document.write("Hello World !");
//-->
</SCRIPT>

Full Example of Embedding a Script

Deprecated:
<Script language="JavaScript">
<!--
document.write("Hello World !");
//-->
</Script>
HTML 4.0:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
       "http://www.w3.org/TR/REC-html40/strict.dtd">
  <HTML>
  <HEAD>
  <TITLE>Hello World Script</TITLE>
  <META http-equiv	= "Content-Script-Type"
 	 	content	= "text/javascript">
  </HEAD>
  <BODY>
  <SCRIPT type="text/javascript">
<!--
document.write("Hello World !");
//-->

  </SCRIPT>
  </BODY>
  </HTML>

Additional Resources:

HTML 4.01 Tags


Up to => Home / Authoring / HTML / 4 / Tags




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers