Monday, November 19, 2007

How to create Styles with Tag Selectors

How to create Styles with Tag Selectors

To create Styles with Tag Selectors

One of the most useful features of cascading style sheets is the ability to reformat the visible part of an HTML document based on its structure—that is, its hierarchy of tags.

To create a style based on a tag selector:

Step 1.

  • With the Style Sheet window in the foreground, click the New Tag button in the style sheet toolbar. The new style is listed under Tags, with its name selected.

Step 2.

  • In the Basics tab of the CSS Selector Inspector, name the tag selector in the Name text box, and press Enter.

  • Tag selectors are HTML start tags with less than and greater than (<>) characters stripped off—for example, h2 for second-level headers, p for plain-text paragraphs, I for italicized, and b for boldface inline formatting.

Step 3.

  • In the CSS Selector Inspector, you have to add the style properties.

Step 4.

  • Any new style properties that you add are automatically applied to paragraphs or blocks the text formatted with the tag used as the selector.

            1. Basics tab of the CSS Selector Inspector

            2. Tag selector

            3. Style properties


No comments: