CSS Basics.com

Chapter 6: CSS Spans

Spans are very similar to divisions except they are an inline element versus a block level element. No linebreak is created when a span is declared.

You can use the span tag to style certain areas of text, as shown in the following:

<span class="italic">This text is italic</span>

Then in my CSS file:

  font-style: italic;

The final result is: This text is italic.

The purpose of the last 2 chapters was to provide you with a basis for using CSS in an (X)HTML file. For a more detailed explaination of XHTML please visit W3Schools

Previous Chapter: Chapter 5 - Divisions

Next Chapter: Chapter 7 - Margins

Valid XHTML 1.1! Valid CSS!

CONTENT © 2004-2008 CSS BASICS, a site by Splashpress Media.
Content written by Ben Partch with contributions from Paul O'Brien & Vinnie Garcia.
Terms of Use  -   Accessibility  -   Feedback