asp.net.ph

Skip Navigation Links

rule Object

Language References


DOM Level 2 Specification.

Represents the declaration ( such as 'font-family: helvetica' ) and its selector ( such as 'H1' ) of a cascading style sheet ( CSS ).

Remarks

A rule defines a set of CSS attributes applied to a set of HTML elements.

Members

rule Members

Example

The following example sets a single rule.

<style>
  h1 {color: red;}
</style>

Assuming this is the only style sheet in the document, the following code will return the rule declared above.

oRule=document.styleSheets ( 0 ).rules ( 0 )
See Also

rules



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note