Apply a style

You can use the Apply Styles panel, Manage Styles panel, or the Style toolbar to apply a class or ID selector from your internal and external cascading style sheets (CSS). The Apply Styles panel enables you to apply multiple styles to a selection while the Manage Styles panel and Style toolbar are limited to applying one style. The Style toolbar enables you to quickly name and apply new undefined styles in your page.

You do not need to apply styles that use an element for a selector since these kinds of styles are automatically applied to their associated element throughout a web page. The Apply Styles panel lists element selectors under Contextual Selectors and along with the Manage Styles panel, displays a blue dot next to the style's name. The Style toolbar doesn't list element selectors.

To apply a style

  1. In Design view or Code view, in your web page, select the item you want to apply a style to.

  2. Do one of the following:

    • To apply multiple existing styles, in the Apply Styles panel, press CTRL while you click each style that you want.

    • To apply a single existing style in the Apply Styles panel, click the class or ID style you want.

    • To apply a single existing style in the Style toolbar, in either the Class or ID drop-down box, click the style you want.

    • To apply a single existing style in the Manage Styles panel, right-click the class or ID style you want, and in the shortcut menu, click Apply Style.

    • To create and apply a new style without defining any properties, in the Style toolbar, in either the Class or ID box, type a unique name for the new style.

See also

Tasks

Attach or detach an external cascading style sheet
Create a style
Modify a style

Reference

Apply Styles panel
Style toolbar

Concepts

Cascading style sheet reference

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.