Making Text Bold or Italic

One way to make text stand out is to format it in boldface or italics.

To make text bold:

1.
Type <b>.
2.
Type the text that you want to make bold.
3.
Type </b>.

To make text italic:

1.
Type <i>.
2.
Type the text that you want to make italic.
3.
Type </i>.
Figure 4.1. You may use bold or italic formatting anywhere in your (X)HTML document, except in the title.

✓ Tips

  • You can also use the less common em and strong tags to format text (Figures 4.2). These are logical formatting tags for “emphasizing” text or marking it as “strong”. In most browsers, em is displayed in italics and strong in bold. On some browsers, ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.