|
|
Next: Styling Text Blocks Up: Lecture 8 Previous: Adding Style Data
Handling Style Data
All HTML elements can be given a single
They provide flexible ways to select HTML elements for styling.
Style declaration in CSS
can be applied to HTML markup
to apply shared styles to some elements and unique style to another.
Result is following:
Some stuff
Other content
More of same stuff
CSS class declarations need not be specific to a tag type
HTML provides two tags for grouping text into blocks
| <div> ... </div> | displayed with line break before and after |
| <span> ... </span> | displayed inline |
They can be used to confer style on all of that block.
| Lecture 8 | XHTML 1.0 | Slide 4 |