Spanning


There are two tags which you can use to modify portions of a document. The first one is <DIV> (logical division). DIV will create breaking space at the top and bottom of the section (similar to BR). Here is an example of using a style.
Mary had a little lamb
<DIV style="font-style:italic">
Its fleece was white as snow
</DIV>
And everywhere Mary went<BR>
The lamb was sure to go
See this example.

The second tag is the <SPAN> tag which is new to HTML 4. The SPAN tag is similar to DIV, but it does not break the text, so you can include it inline.

I'll never see myself in the
mirror with <SPAN style="color:red">my eyes closed.</SPAN>
See this example.

This is useful to enclose a large group of text disregarding what tags or styles are within.


Previous Section
Grouping
Table of Contents Next Section
Nesting