<span> tag


Definition


The tag has no meaning when used on its own. It is used to group inline-elements in a document, most commonly to apply CSS to specific sections of a page.

Attribute


Span does NOT require any attributes because it is commonly used to point to a style sheet. If no style sheet is available, or one is not wanted, attributes can be added to the <span> tag to be applied to the selected part of a page.

Example


<p>This is how you would add a style sheet to <span class="this_style_sheet">this text</span>using the span tag.</p>

Here is how you would add attributes to text using <span> without referencing a style sheet.

You can highlight your text any color you like
<span style="background-color: #FFFF00">You can highlight your text any color you like</span>

You can add colored text
<span style="color: red; font-size: 14pt">You can add colored text</span>

They're many more span tags found here http://www.hypergurl.com/span.html, including mouse over tags, "alt tags" and background image tags.

More examples of <span> can be found here.



Information used on this page was taken from http://www.htmldog.com and http://www.hypergurl.com.


Page Information

  • 11 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts