Using Cascading Style Sheets (CSS) in fourth-generation browsers gives similar capabilities. Of course you will still be restricted, for the moment, by the availability of fonts on the user's system. CSS can't magically produce Frutiger Extra Bold, Bold, Roman, and Light fonts out of nowhere. Yes, there are a few font-embedding technologies available now, but they are not reliable enough for general use just yet.
The idea behind CSS is that content and type markup are kept separate, giving the designer control over type that hasn't been provided for in basic HTML. Apart from the ability to make global changes to styles very easily, it is also possible to deliver the same content with different specifications according to the browser being used. Whether the user has a whiz-bang computer with a large 24-bit monitor or a small black-and-white organizer, it is technically feasible to invoke a different set of styles that give the optimal user experience in any browser. And, if the browser doesn't have CSS capabilities, the layout will degrade gracefully to give, at least, a satisfactory display.
This particular block of text is, as far as HTML is concerned, one paragraph. The fact that it is visually broken up into numerous indented paragraphs using
tags and runs of means that it will degrade better on non-CSS capable browsers. Normally I would alternates with regular spaces, but the CSS implementation in MsIE ignores the spaces and halves the indent.
The style named "normaltext" is providing the type size, specified in pixels, not points, because pixels are absolute across platforms and points are not. In normal text, I have also specified the typeface and line-height. If all that CSS could do were to add a provision for line spacing, it would still be invaluable.
In the next section, "alttext" supplies the typeface specifications and color and provides the indents.
Just like HTML and all the other cross-platform and cross-browser issues, CSS implementation is not very consistent at the moment. It is supported by Netscape and Explorer 4 and above, and partly in Explorer 3.x, but the results are not always predictable.
You can do a lot more with CSS than I have mentioned in this primer. The basic facilities are now reasonably reliable across browsers, but some of the more esoteric features can cause problems. Even this relatively simple, justified section with paragraph indents behaves quite differently in Netscape and Explorer depending on whether use.
As with any other Web page design uncertainties, you really need to test-fly your pages on as many computers and browsers as you possibly can.
The examples here only scratch the surface of what CSS can do. In addition to creating custom styles, you can modify most of the existing HTML styles. You could, for instance, redefine the tag to be a larger type size or a different color, or adjust the tag to be a particular font, size, and style.
Sunday, March 28, 2010
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment