HTML and CSS Reference
In-Depth Information
<link> A <link> tag specifies a special relationship between the current document and
another document. Most commonly, it is used to specify a style sheet used by the document
(as discussed in Chapter 4):
<link rel="stylesheet" media="screen" href="global.css" type="text/css" >
However, the <link> tag has a number of other interesting possible uses, such as to set
up navigation relationships and to hint to browsers about pre-cacheable content. See the
element reference in Chapter 3 for more information on this.
<object> An <object> tag allows programs and other binary objects to be directly
embedded in a Web page. Here, for example, a nonvisible Flash object is being referenced
for some use:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="0" height="0" id="HiddenFlash" >
<param name="movie" value="flashlib.swf" />
</object>
Using an <object> tag involves more than a bit of complexity, and there are numerous
choices of technology, including Java applets, plug-ins, and ActiveX controls.
<script> A <script> tag allows scripting language code to be either directly embedded
within,
<script type="text/javascript">
alert("Hi from JavaScript!");
/* more code below */
</script>
or, more appropriately, linked to from a Web page:
<script type="text/javascript" href="ajaxtcr.js"></script>
Nearly always, JavaScript is the language in use, though other languages such as VBScript
are possible.
<style> A <style> tag is used to enclose document-wide style specifications, typically
in Cascading Style Sheet (CSS) format, relating to fonts, colors, positioning, and other
aspects of content presentation:
<style type="text/css" media="screen">
h1 {font-size: xx-large; color: red; font-style: italic;}
/* all h1 elements render as big, red and italic */
</style>
The use of this tag will be discussed in Chapter 4.
Comments Finally, comments are often found in the head of a document. Following SGML
syntax, a comment starts with <!-- and ends with --> and may encompass many lines:
<!-- Hi I am a comment -->
<!-- Author: Thomas A. Powell
Search WWH ::




Custom Search