Creating and Applying Character-Level Styles

In contrast to the block-level element which takes up the full width of a line, the character-level element only applies to selected text and is used within a block element.

You can only create child styles classes of root (or parent) styles. There are many standard CSS character tags, such as <b>, <i>, <img>, <span>, and <sup>, which have corresponding styles in the stylesheet. The <span> style is often used for creating general character-level style classes (i.e., when there isn't already another character-level style that meets your needs).

How to Create a Character Style Class

Let’s create a span class to emphasize text with bold and italic formatting.

  1. Open Styles.css.
  2. In the local toolbar, click .
  3. In the New Selector dialog, from the HTML Element drop-down, select span.
  4. In the Class Name field, type Emphasis-BoldItalic. Click OK.

    Note The image above shows the New Selector dialog with Advanced Options expanded. Notice the name of the selector is "span.Emphasis-BoldItalic." When creating a new style class, it is appended to the root (or parent) style, and separated by a period. In this case, "span" is the parent while "Emphasis-BoldItalic" is the child.

  5. From the Styles drop-down, select Character Styles.
  6. In the left pane tree structure, make sure span is expanded, and Emphasis-BoldItalic is selected.
  7. In the Show drop-down, select Show: Assorted Relevant Properties.
  8. Expand the Font group.
  9. Next to the font-style property, click Display more options., and select italic.

  10. Next to the font-weight property, click Display more options., and select bold.

  11. Click Save the active file. to save your work.

How to Apply a Character Style Class

  1. Open Austin-City-Limits.htm.
  2. Select “University of Texas” in the last paragraph.
  3. Right-click and from the context menu, select Span Class > span.Emphasis-BoldItalic.

  4. Open Introduction.htm.
  5. Select “University of Texas” in the second paragraph.
  6. Press CTRL+SHIFT+H, and from the Style Picker, select span.Emphasis-BoldItalic.

  7. Click Save all files. to save all files.

Note Since this is a character-level style that might be used quite a bit, you can pin it to appear at the top of style lists for quick accessibility in the Style drop-down, Style Picker, or the Styles window. See Pinning Styles.

Note To revisit how styles can be easily identified in editors, see Style Tags in Flare Desktop Editors.