CSS Syntax
selector { property: value; }Attaching CSS
<style>@import url('styles.css');
</style>
CSS Selectors
tag.class
#id
CSS Units
em for textpx for rest
Right Column
CSS Design Techniques: Text Properties
- text-indent
- Indentation that appears before the first formatted line
- Can be negative
- Examples:
p { text-indent:10px; }
p { text-indent:-5pxt; }
- text-align
- 'left', 'center', 'right', 'justify'
- word-spacing
- Addition to the default space between words (.5 em is default)
- Can be negative
- Examples:
em { word-spacing:0.6em;}
strong { word-spacing:-0.3em;
- letter-spacing
- Spacing between characters
- Value can be negative
- Example:
a { letter-spacing:0.5em; }
- text-transform
- ' capitalize', 'uppercase', 'lowercase'
- Example:
h3 { text-transform: capitalize;}
- text-decoration
- 'underline', 'overline', 'line-through', 'blink' (!)