O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Formatting Text

As you know from earlier chapters, there are many ways to format text. Here’s a quick review:

  • You can use direct formatting, in which an individual block of text receives certain formatting. For example, you might make a word bold in a paragraph by using the <b> tag, as follows:

    This is a <b>great</b>party.
  • You can create a span, and then apply formatting to the text within the span, such as shown here:

    <p>This is a <span style="font-size: 13px">great</span> party.
  • You can place a style in the opening tag for a certain paragraph or other block of text. For example, you might specify a certain color for a paragraph’s text, as shown in the following:

    <p style="color: green">This is a great party.</p>
  • You can create a style that refers to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required