Welcome to Soo-Im's Web Site
Welcome to Soo-Im's Web Site


 

CSS - Cascading Style Sheet


Index:
- A Basic Guide to CSS Version 2
- A Basic Guide to CSS Mobile Profile 1.0
- Style Sheet Media Types Demonstration


The above links lead to pages with brief guides on available selectors for CSS version 2 and CSS Mobile Profile 1.0, including some examples on how to use these selectors.

To add style in an XHTML document, a cascading style sheet (CSS) can be used. The CSS code can either be put in-line within the XHTML code itself or in a separate CSS file. By separating the CSS code from the XHTML code, major changes could be done to the style, simply by rewriting something in a CSS file without having to change every single XHTML document. Another advantage of placing the CSS code in a separate file is that many or all the XHTML documents could refer to the same CSS file, which could create a web site with a homogeneous style.

Check out the links listed on the web resources page for CSS tutorials.


Here is an example on how CSS style is written in-line:


Here, the same style is accomplished with a separate CSS file:


The above CSS style will be displayed as followed:

Double negations

A linguistics professor was lecturing to his class one day.

"In English," he said, "a double negative forms a positive. In some languages though, such as Russian, a double negative is still a negative. However," he pointed out, "there is no language wherein a double positive can form a negative."

A voice from the back of the room piped up, "Yeah, right."




This page was last updated: 2003-07-22

Home: http://sooim.pp.se