Home > Articles > Graphics & Web Design > Dreamweaver & Flash

  • Print
  • + Share This
This chapter is from the book

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:

  1. Type some text in the Dreamweaver Document window.
  2. Apply Heading 3 to the text by selecting Heading 3 from the Format drop-down menu in the Property inspector.
  3. Create a new style by clicking the New CSS Rule button in the CSS Styles panel. The New CSS Rule dialog box appears.
  4. 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

    Figure 6.9 The Tag drop-down menu contains a list of all the HTML tags you can change by using CSS styles.

  5. Select the Block category.
  6. Select Center from the Text Align drop-down menu, as shown in Figure 6.10, and click the OK button.
    Figure 6.10

    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.

  7. Click OK and the h3 text in your web page should jump to center alignment.
  • + Share This
  • 🔖 Save To Your Account