![]() |
Web Accessibility AS/DSPS |
| Cuesta Home... DSPS... Web Access... Using CSS |
Cascading Style Sheets (CSS) allow you to create a consistent "look" across multiple web pages with just one file. You can specify font size, type, and color, spacing between paragraphs, margin, indentation, and much more. You include a link to the CSS file from each of your web pages. Then, it is relatively easy to change the look and feel of your entire web site by simply editing the cascading style sheet file.
There are three types of CSS, external, embedded, and inline. External style sheets are text based files, and can be applied to multiple web pages. Embedded style sheets are included within the head section of a web page, and only affects that web page. Inline styles allow you to modify a small portion of a web page.
The external style sheet file can be created in Notepad or in FrontPage. See the CSS Exercise for information creating and editing CSS files. For examples of the code which can be entered into the CSS file, see the CSS Handout. or visit one of the links below.
Cascading refers to the capability to combine style information from more than one source, such as an external style sheet and an internal style sheet. You can apply style rules to a page in a variety of ways. External style sheets can be linked to one or more pages, applying the same style rules to all. Embedded style sheets apply style rules to a single page. Inline styles apply style rules to page elements. You can use all three approaches within a single page, if you want.
The cascading part of the picture comes into play because there is an order to the application of style sheets. The closer a rule is to the HTML element it affects, the higher precedence it is.
To test your pages without CSS, copy your CSS file to someplace safe, then delete the CSS file. Now look at your pages. If the pages are still readable, restore your CSS file.
To read more about cascading style sheets
To learn more about cascading style sheets, visit