First page Back Continue Last page Graphics
Span and Div
There are two tags that are particularly useful when using CSS: <span> and <div>. They are both container tags that have minimal formatting associated with them.
The <span> tag is an inline element that simply holds text without doing anything special to it.
The <div> tag is a block element and causes the text it encloses to start on a new line.
Using <span> and <div> tags in conjunction with classes and IDs allows for great flexibility in creating pages.
For example, to apply a font to a specific section of text, create a class, and use the span tag with that class:
.neatstuff {font-family: Comic Sans MS;}
<span class="neatstuff">This is in Comic Sans</span>