Next / Previous / Contents / TCC Help System / NM Tech homepage

10.14. span: The generic inline container

This inline element carries no specific meaning of its own. Its primary purpose is to serve as a generic inline text container that can be tagged with a class or id attribute so that a CSS stylesheet can specify how that text is to be formatted. For example, suppose you want keywords in your document to be formatted in red, boldface type. In your XHTML, you would enclose those keywords in something like this:

<span class='keyword'> ... </span>

Then you would link your page to a CSS stylesheet that uses the selector “span.keyword” to specify red, boldface type.