• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 1. Dreamweaver MX Basics > Applying HTML Styles

Applying HTML Styles

Now that you have several HTML styles defined, it's time to try applying them. Applying a style to a selection means you have to highlight all the appropriate text before applying the style. Applying a style to a paragraph means you have to place the insertion point within the paragraph—you don't have to select each word in the paragraph.

1.
With the HTML Styles panel open, select the text “usually glass, used to focus and increase light intensity.”

In this case, the style to be applied is a paragraph syle, so you can either select the text entirely or simply place the insertion point within the text. Each line within a list is treated as a separate paragraph.

2.
Click Definition in the HTML Styles panel.

The style is applied to the paragraph.

NOTE

To edit an HTML Style, make sure that no text is selected in the document window. Control-click (Macintosh) or right-click (Windows) on a style name in the panel and choose Edit from the drop-down menu. (Alternatively, you can double-click a style name to open the Define HTML Style dialog box.) If you make a change, such as Font Attributes, and click OK, any new selections created with the style (or selections to which you apply the style) reflect the change you made. The change you make in a style does not affect the text that already has that formatting applied. If you want current text to reflect the new formatting, you have to reapply the style.

3.
Apply the Definition style to the remaining definitions in the list.

The style is applied to the rest of the definitions.

NOTE

Deleting a style can be a little tricky. First, you must make sure that no text is selected in the document and that the Auto Apply check box in the bottom left corner of the HTML Styles panel is not checked. Then you have to select the style you want to delete and click the trashcan icon in the bottom right corner of the panel. If you forget to turn off the Auto Apply option and have any text selected, you might see that text on the page change to the HTML style you selected to delete. You can clear the text formatting by selecting the formatted text and selecting Clear Paragraph Style or Clear Selection Style in the HTML Styles panel. All formatting will be removed, regardless of whether it was applied with an HTML style or through the Property inspector. If you are clearing a paragraph style, you can place the insertion point anywhere in the paragraph—you don't have to select the whole paragraph.

4.
Select the text “(U.S.A.)” just after “Cape Hatteras.” In the HTML Styles panel, click Place.

This time you are applying a selection style, so make sure you highlight all the text that should be styled. After you click Place, the style is applied to the selected text.

5.
Apply the Place style to the rest of the locations listed in the Notable Lighthouses of the World section.

The HTML styles you create can be used in other projects or shared with other users. When you create an HTML style, a file named Styles.xml is saved in a folder named Library. You can copy the Styles.xml file and move it to other site folders or share it with coworkers.

6.
Apply the Lighthouse style to the rest of the lighthouse names listed in the Notable Lighthouses of the World section.

You have applied to your document a variety of HTML styles that can help you save time and maintain consistency throughout your site.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint