HTML STYLE SHEET PROPERTIES Here are some of the style sheet properties you may want to use. It is not a complete list - background
- defines background colour or image.
Colours are defined either in RGB code or color name e.g. background: blue; Background images are described as thus background: URL(filename);
e.g. background: URL(mybackground.gif); - color
- defines text colour. Either in RGB code or colour name
- font-family
- defines the font type e.g. font-family: times new roman;
- If more than one listed
e.g. font-family: comic sans ms, serif sans, arial; Then a browser will use the first it has - font-size
- self explanatory. Expressed in pt
e.g. font-size: 14pt - font-style
- defines special style like italic or bold
- margin-bottom
- defines the bottom margin of an element in pixels. Default is 0
e.g. margin-bottom: 3 - margin-left
- defines the left margin of an element in pixels. Default is 0
Useful to create indents e.g. margin-left: 20 - margin-right
- defines the right margin of an element in pixels. Default is 0
- margin-top
- defines the top margin of an element in pixels. Default is 0
- text-align
- self explanatory e.g.text-align: right;
- text-decorartion
- Very useful for links. Defines text embelishments like
underline overline (not supported in Netscape) line-through none (the default - useful for getting rid of underlines in links) blink (not supported by MSIE and please don't use it !!!!) - text-indent
- Allows you to create an indent.
Value can be in % or pixels (px) or you can use metric or imperial measures (e.g. in or mm but be warned not all browsers support them) - Useful for setting <p> styles
e.g. text-indent: 60px |