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:

.italic{
  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

0 Comments

Your email address will not be published. Required fields are marked *