You should already be familiar with most of the features of HTML and CSS1 style sheets. They are briefly reviewed, as they are the building blocks for the more animated features of dynamic HTML.
Styles provide all the text control features normally found in word processors; font size, weight, family and decorative features such as underlining.
Styles provide margin, padding and border spacing features which are block formatting information equivalent to 'paragraph formats' in word processors.
Styles allow the element they apply to be located away from the normal position it would adopt when rendered by the browser. Absolute positioning allows the element to appear anywhere.
With absolute positioning a possibility, elements can overlap. The style mechanism defines the z-order that resolves which elements appear on top.
Elements can take up visual space in a document, or they can not be allocated any at all, much like hidden form fields. If they do take up space, then they can be visibly present (the normal case) or just withhold that space from other uses, like the Netscape proprietary
tag.<SPACER>
The content of a styled element takes up a set area, known as a bounding box. If the element's content exceeds the capacity of the bounding box, it may be clipped. Clipping means the overflowing parts of the content do not appear.
Internet Explorer 4.0 supports a filter enhancement to styles that allows additional effects to be laid on top of other style information.
Styles normally apply to a specific instance of an HTML tag. Sometimes the piece of content to be styled doesn't easily fit into one of the predefined tags. The
or <DIV>
tags can be used to mark out an arbitrary section of content. <SPAN>
provides a line break before and after the content.<DIV>
The
tag is an alternate syntax for absolutely positioned styles. It applies to Netscape 4.0 browsers only, and is considered a failed experiment in the sense that Netscape now advocates use of the <LAYER>
style property instead. That property is part of a standard, whereas layers aren't.'position'
Chapter 4 briefly describes the options for embedding already-animated objects into web pages, such as progressive GIFs.