|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
To get started, it is helpful to recall some of the style-related codeboth CSS and JavaScriptthat you saw earlier in the chapter. Go back a few pages and look at Listing 25.1. Both techniques apply the same style information, yet one is an implementation of CSS style sheets and the other is an implementation of JavaScript Accessible Style Sheets. If you are familiar with one approach, you can see that it would be pretty easy to learn the other. Most of the style characteristics you can set have the same name (although the names differ in the use of hyphens, capitalization, and so on). The chief difference between the two approaches is how the style characteristics are assigned. The CSS approach uses name/value pairs separated by a colon. The JavaScript approach is more object based in that you reference an objects (a tags) style property and set it to the value you want. Beyond the syntactical difference in assigning values, the two approaches arein most respectsequivalent. Table 25.1 summarizes the style characteristics you can assign by either approach and includes the keyword for the characteristic that you would use in either the CSS or JavaScript approach. The table should make a handy reference for all style sheet authors, regardless of how they are assigning style information.
You are probably familiar with most of the characteristics in Table 25.1, except possibly for the last three. Display controls how an element is displayed and can take values of block (display as a block-level element), inline, list-item, or none. List style type refers to the different styles of ordered and unordered lists HTML supports. You may set the list-style-type keyword or the listStyleType property to values of disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, or none. Finally, the whitespace characteristic specifies how extra whitespace should be treated. A whitespace value of normal means that extra whitespace characters will be ignored, and a value of pre means that all whitespace characters will be rendered.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |