HTML Elements as Selector

Previous Next

See Also

All HTML element types are possible selectors within style sheet rules.

To set a "default" style property for a document, you can set the property on an element from which all visible elements descend. In HTML documents, the BODY element serves this function. For example, the style sheet rule below specifies a blue, italic, Helvetica font for the whole document:


   font-family: helvetica;

   font-style: italic;

   color: blue;