Read HTML The Definitive Guide Online
Authors: Chuck Musciano Bill Kennedy
If you don't include a src attribute with the
13.2.4.7 The type attribute
Use the type attribute in addition to or in lieu of the src attribute. Its value explicitly indicates the MIME type of the embedded object, which in turn determines which plug-in the browser will invoke to process the object. This attribute is not required if you include the src attribute and the browser can determine the object type from the object's URL or server. You must supply a type attribute if you don't include the src attribute.
It may seem odd to use an
13.2.4.8 The units attribute
The default units of measure for the height and width attributes that control the
For example:
13.2.5 The
Some browsers do not support the
Function:
Supply content to
None
End tag:
None
Contains:
Nothing
Used in:
text
The popular browsers ignore the contents of the
13.1 Applets and Objects
13.3 JavaScript
13.3 JavaScript
All the executable content elements we've talked about so far have had one common trait: they are separate from the browser and the HTML document - separate data, separate execution engine.
JavaScript is different. It is a scripting language that taps the native functionality of the browser. You may sprinkle JavaScript statements throughout your documents, either as blocks of code or single statements attached to individual tags. The JavaScript-enabled browsers, including both Netscape and Internet Explorer, interpret and act upon the JavaScript statements you provide to do such things as alter the appearance of the document, control the display, validate and manipulate form elements, and perform general computational tasks.
Like with Java, we will not pretend to teach JavaScript programming in this book. We'll show you how to embed and execute JavaScript within your documents, and ask that you turn to books like JavaScript: The Definitive Guide (O'Reilly & Associates) for a complete definition of the JavaScript language.
13.3.1 The tags is processed by the browser as executable JavaScript statements and data. You cannot place HTML within this tag; it will be flagged as an error by the browser.
Browsers that do not support the
For browsers that ignore the