Embedding style definitions in an HTML page

You can use the Global Style Sheet editor to add embedded styles to the current page in the HTML editor.

NoteEmbedded styles and client browsers Older browsers might not recognize the STYLE element. You can surround the style definitions with comment tags (as you would for SCRIPT elements) to direct these browsers to ignore the embedded style definitions. You must add the comment tags (<!-->) directly in the Source view for the HTML page.

StepsTo add or embed style definitions in an HTML document:

  1. Open the HTML file in which you want to embed style definitions and select Edit>Global Style Sheet from the HTML editor menu bar.

  2. Right-click an item in the left pane of the Global Style Sheet editor, and select Insert <STYLE> Tag from the pop-up menu.

  3. (Optional) In the Insert New Style Tag dialog box, specify a title and ID in the appropriate text boxes, select a media type from the Media drop-down list, and select or clear the Disabled check box.

  4. In the left pane, right-click the newly specified style or another style that you want to edit. Then define styles and click OK.

    When you close the Global Style Sheet editor, the editor inserts the new STYLE element in the Head section of your HTML file, along with any selector styles for HTML elements, classes, and IDs that you add.

    Separate STYLE tags are generated in the HTML page for each STYLE element you add to the left pane of the Global Style Sheet editor. Selector styles are added to the HTML page only between STYLE tags that correspond to the STYLE element under which they appear in the left pane of the style sheet editor.