JavaScript EditorBest javascript editor debugger     Ajax website 



Main Page

Previous Page
Next Page

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, though, they're displayed differently. For example, some handhelds can't display italics and use underlining instead.

    Figure 4.2. If you prefer, you can use the logical em and strong tags to add both structure and formatting at the same time.

  • You may also use cite (for citations), dfn (for definitions), and var (for variables) to make text italic while giving information about the content.

  • The address tagold-fashioned but still validis another logical tag for making text italic. It's usually only used to format the Web page designer's email address.

  • For more control over bold and italics, try style sheets. For details, consult Creating Italics on page 154 and Applying Bold Formatting on page 155.


Figure 4.3. Bold and italic formatting are the simplest and most effective ways to make your text stand out.



Previous Page
Next Page


JavaScript EditorBest javascript editor debugger     Ajax website 
R7