This section describes the properties that you can use in your style sheets and
how they work.
-
Note: If you find that some of the style
properties listed in this section don't work as I’ve described them, try switching
the properties around.
For example, if you assign the properties font-weight
and color (in that order)
to the <h1> tag and
have problems, try switching the order.
The properties allow you to:
- Control typography
- Control control text alignment, spacing, and other formatting (such as underline and case)
- Add colour to tags
- Control the background colour as well as the position and properties of a background picture. Background properties allow you to position a background picture, repeat it, and declare whether it should be fixed or scroll with the document
- Set borders, margins and padding
- Control the format of HTML lists
- Control over the two-and three-dimensional appearance of tags in the page. Instead of building tables to arrange your page, you can put each tag exactly where you want it
- Control the content that you can add before and after a tag. For example, to add automatic numbering
- Create outlines on buttons, form fields, image maps and so on
- Control the look of tables
- Use pseudo classes and elements to set the style of links, change the cursor and create special effects such as a drop capital
- Specify exact locations for page breaks that affect the printing of the document
- Set up styles for different media such as screen, printer, braille devices and so on
- Create web pages that allow blind or partially sighted users to use web pages
|
|
More information
Using cascading style sheets
How to use style properties
Font specification
Text formatting
Setting colours
Background colours and pictures
Borders, margins and padding
Bulleted and numbered lists
Positioning tags on a page
Generated content and automatic numbering
Dynamic outlines
Laying out tables
Pseudo classes and elements
Page layout for printing
Media types
Speech style sheets
|