Syntax for style attributes and selectors

For external style sheets and embedded styles, a selector is the link between an HTML element and a style attribute. The selector specifies what element is to be affected by a declaration for a specific style attribute. The style is that part of the rule that sets forth what the effect will be. In this example, the selector is H1 and the style is color:red:

H1 {color: red }

When this declaration is included in an embedded style tag on an HTML page or in an external style sheet linked to the page, all H1 elements on the page will appear in red (unless overridden by inline styles or scripts for particular elements).

You can use the Web Target style sheet editors to assign specific style attributes to HTML elements and selectors through a user-friendly interface. The editors insert the correct syntax for your style definitions onto your HTML page or external style sheet.