Redefining an HTML Tag
You can redefine HTML tags by creating element selectors using CSS. You apply these styles by simply applying HTML tags as you normally would. By default, text formatted with the <h3> tag appears slightly larger than normal, in a bold font that is left justified with one or two blank lines above and below. After you redefine the <h3> tag, any text with that tag applied to it immediately appears with the new CSS formatting. To create some text, make it a Heading 3, and modify its appearance with CSS:
- Type some text in the Dreamweaver Document window.
- Apply Heading 3 to the text by selecting Heading 3 from the Format drop-down menu in the Property inspector.
- Create a new style by clicking the New CSS Rule button in the CSS Styles panel. The New CSS Rule dialog box appears.
- Select the radio button beside Tag (Redefines the Look of a Specific Tag) and then select h3 from the Tag drop-down menu in the dialog box that appears, as shown in Figure 6.9.
Figure 6.9 The Tag drop-down menu contains a list of all the HTML tags you can change by using CSS styles.
- Select the Block category.
- Select Center from the Text Align drop-down menu, as shown in Figure 6.10, and click the OK button.
Figure 6.10 The Block category properties apply to blocks of text. You can change the default alignment of a text block in the Text Align drop-down menu.
- Click OK and the h3 text in your web page should jump to center alignment.