and <I>, and layout work-arounds such as complicated tables or image spacers. For example, style sheets can specify the font type, color, line spacing, margins, and positioning of document components such as headings, <H1 >,or paragraphs, <P>. Arbitrary styles can also be applied to any part of a document (see <SPAN> below). The following HTML code is an example of a cascading style sheet, which is placed in the header section of an HTML file or in a separate file.
<STYLE TYPE="text/css">
BODY{
}
background: white;
color: black;
margin-left: 5%;
margin-right: 5%;
H1 (
}
margin-left: -5%;
text-align: left;
color: blue;
H2 {
}
text-align: center;
color: red;
#userdefined1 {
font: italic bold 16pt Arial;
color: green;
}
<!STYLE>
In this example, the body text will be black on a white background. Any H1 headers will be flush to the left edge of the page, and everything else on the page will appear indented by 5% of the page width on both the left and right margins. The userdefined1 style can be applied to anytextontheWeb page by placing the <SPAN ID=userdefined1 >and <!SPAN> tags around the text to be highlighted. The ID attribute can also be used in <P> or <DIV> tags to format whole paragraphs or sections of a document. This simple example uses percentages for positioning. Style sheets allow absolute or relative positioning in percentage, pixels, points, and other units, for complete control of a Web page.
HTML files can be linked to external style sheets by placing a line of code such as the following in the header section:
<LINK REL=StyleSheet HREF="mystyle.css"
TYPE="texticss">
The mystyle.css is a text file that contains the
<STYLE> ... <iSTYLE> content, such as shown above, but not <HTML>, <HEAD>, or any other HTML tags. An external style sheet can control the formatting of mul tiple documents, allowing an author to create and maintain a consistent interface throughout a set of Web pages by editing only one file. More tools and information about cascading style sheets are available on thefollowing Web sites: CSS draft specifications: http://www.w3.org/Style/css/HTML Help by The Web Design Group: http://www.htmlhelp.com/
DYNAMIC HTML
The cascading style sheets provide the tools to control style and layout on a Web page. Combining style sheets and scripting languages allows delivery of dynamic and interactive elements on a Web page. A useful feature for interactive tutorials is the ability for a text block or image to change based on the position of the pointer or on a mouse click in a certain area. Other examples include drop down menu boxes, text boxes, and animated text or image overlays.
Unfortunately, these dynamic features are where Netscape Navigator and Microsoft Explorer diverge in their implementation of DHTML. DHTML pages on the Web currently, are either browser-specific, or they incorporate browser testing and two sets of DHTML code. The more sophisticated DHTML development tools have the capability to produce browser-independent code. The following development tools support CSS and DHTML to varying extents.
HomeSite 3.0, Allaire Corp.,
http://www.allaire.com/HoTMetaL PRO 4.0, SoftQuad Inc., http://www.softquad.com/products/hotmetal/lnteractor 1.1, mBED Software, http://www.mbed.com/NetObjects Fusion 3.0, NetObjects Inc., http://www.netobjects.com/Dreamweaver 1.0, Macromedia Inc., http://www.macromedia.com/sottware/dreamweaver/
More tools and information on DHTML are available on the following Web sites.