|One of the reasons CSS is so popular is the versatility it gives to HTML tags. Although you cannot "turn off" the tag's built-in controls, you can add more controls to the HTML tags to extend their usefulness. You do this by adding new CSS definitions to the tag selector. Let's use the HTML <p> tag for our example and we will add a background color, a font face, font size and a text color control to the <p> tag. This will cause everything between any opening and closing <p> tags to be controlled by our new definitions throughout the web page. |
In our example, the CSS rule begins with the HTML selector (p) which is followed by the CSS declaration block containing all the property-value definitions we wish to add. As usual, each definition begins with the property, followed by a colon, the value and ending with a semicolon. The entire block is placed within curly brackets. There are a few things to remember when writing your own CSS rules for HTML tags.