Using style classes

You can create style "classes" that you can apply to a <p> or <span> tag using either tag's class attribute. When applied to a <p> tag, the style affects the entire paragraph. You can also style a span of text that uses a style class by using the <span> tag.

For example, the following style sheet defines two styles classes: mainBody and emphasis.

.mainBody {  
  font-family: Arial,Helvetica,sans-serif;
  font-size: 24px;
}
.emphasis {
  color: #666666;
  font-style: italic;
}

Within HTML text you assign to a text field, you can apply these styles to <p> and <span> tags, as shown below.

<p class="mainBody">This is <span class="emphasis">really exciting!</span></p>