Web Developer Foundations: Using XHTML
Second Edition by Terry Felke-Morris
 
Chapter 9 - CSS Introduction

Now that you've had an introduction to XHTML, graphics, web design and web site development concepts, you are ready to study a more advanced technique of formatting web pages - Cascading Style Sheets (CSS).

CSS is not new -- it was first proposed as a standard by the W3C in 1996. However, CSS has just recently begun to be supported by browsers and other user-agents in a more standard manner. Cascading Style Sheets is a useful technology for separating the presentation style of the web page from the information on the web page itself.

You may recall that the <font> tag is deprecated. This means that while it is still part of the W3C recommendation, it will be dropped from the recommendation in the future. Cascading Style Sheets are used to fulfill the function of the <font> tag in addition to providing many other web page formatting and positioning capabilities. This chapter will introduce you to the use of Cascading Style Sheets (CSS) on the Web.


CSS Documentation CSS Tutorials

W3C Overview of CSS
W3C CSS1 Recommendations
W3C CSS2 Recommendations
Eric Meyer's CSS Mastergrid
CSS Validator

Dave Raggett's CSS Tutorial
EchoEcho.com
Mako.com
HTML Goodies
W3School's CSS Tutorial

More CSS Links

CSS Zen Garden

CSS Vault

CSS and Font Sizes

Wondering how to correspond XHTML font sizes (1, 2, 3, 4, 5, 6, 7) to CSS pt and px configurations? Like so many areas in web technology, the answer is ... it depends!

Since the pt is browser dependent (for example, 12 pt looks different when various browsers are used to display web pages) and the px is monitor-resolution dependent, there is no hard and fast rule for correspondence.

CSS fonts can also be configured usin "ems" (relative size -- the term is borrowed from the print industry) which is something I don't get into at this point -- after all it's just your first week using CSS!

 

View a page containing a table with various configurations in multiple browsers and in different monitor resolution settings. You'll see differences in the display of the text.

Note that the CSS font size text values (such as xx-small, x-small, small, large, x-large, xx-large) roughly correspond to the numerical font sizes of 1 through 7.

Deciding on the target client platform (including browser and monitor resolution) is part of the web design process.

Right now, Internet Explorer at 1028x768 and 800x600 resolution is the most common, although Firefox is gaining support.

Chapter Updates

No errors have been reported for Chapter 9.

Questions or Comments?

The author would like to hear from you!
Send an e-mail to webdevfoundations@hotmail.com

 

Chapter 9 Review

Crossword Puzzle
Chapter 9 Review

Flash Cards
Pick a Letter
Matching

Resources

W3C
W3C HTML Validator
W3C CSS Validator

Color Chart

Design Checklist
Fireworks Tutorial

A List Apart
SitePoint
Good Experience
Digital Web
Dreamweaver
FrontPage

XML Blog News Feed

 

CSS Tip

Every web developer has at one time or another created a style sheet and had it simply not work. Sometimes it is easy to review the code and correct a syntax error. Other times, the error is not immediately apparent. To rule out syntax problems, validate your CSS. Free validators are available from the W3C and the Web Design Group.



Valid XHTML 1.0!


CSS Validator