Creating Inline Spans

While you can organize big chunks of your Web page into head and body sections, into divisions, or even with headers (h1, h2, etc.), you can name smaller chunks or spans of text or other inline elements in order to identify them and apply styles to them.

To name inline spans:

1.
At the beginning of the inline content, type <span.
2.
If desired, type id="name", where name uniquely identifies the spanned content.
3.
If desired, type class="name", where name is the identifying name of the class that the spanned content belongs to.
4.
Type > to complete the opening span tag.
5.
Create the inline contents you wish to label.
6.
At the end of the span, type </span>.
Figure 3.18. The span tag is used to mark a bunch of inline ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.