• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Cascading Style Sheets > Tag-less Styles: The <span> Tag

8.5. Tag-less Styles: The <span> Tag

Up to now, we have used Cascading Style Sheets to change the appearance of content that is within a designated tag. In some cases, however, you may want to alter the appearance of only a portion of a tag's contents—usually text. Designate these special segments with the <span> tag.

Sidebar 2. <span>


Function:

Delimit arbitrary amount of text


Attributes:

CLASSONKEYUP
DIRONMOUSEDOWN
IDONMOUSEMOVE
LANGONMOUSEOUT
ONCLICKONMOUSEOVER
ONDBLCLICKONMOUSEUP
ONKEYDOWNSTYLE
ONKEYPRESSTITLE



End tag:

</span>; never omitted


Contains:

html_content


Used in:

body_content



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint