Here are seven rules of CSS selectors p, h2,. Note, p # paragraph1, a: hover, # news p and [type = "button"].
The first rule is set to HTML element p (paragraph). Paragraphs will be displayed using the font Garamond, or if a font is not available, any other font with serifs («serif»).
The second rule is set to HTML element h2 (header of the second level). Title of the second level will be displayed in red on a white background with increased size.
The third rule will be applied to any element whose class attribute is ‘note’. For example, the paragraph : <p> This paragraph will be displayed in bold red on a yellow background. </ P>
The fourth rule is applied only to the element p, which is equal to the id attribute paragraph1. This item will not have external margins (margin).
The fifth rule defines the style elements hover for hyperlinks. By default, most browsers elements of a text is underlined. This rule will remove the underline when the mouse hovers over these elements.
The sixth rule is applied to elements of p, which are inside of an element with an attribute id, equal to «news» (# news p – this is a typical case of a descendant selector , see point 5 of the list above).
The seventh rule is applied to all elements whose type attribute is button. For example , this rule will be applied to the element <input type=”button”> ( normal button ) , changing its background color to green.