Saved Bookmarks
| 1. |
What do you mean by CSS Selectors? Name a Few. |
|
Answer» <P>CSS selectors are used by web designers to specify or SELECT HTML elements they want to style. FOLLOWING are a few of the most COMMONLY used CSS selectors:
Syntax: #idname Example: Here is the CSS rule that will be applied to the HTML element having id="para1". #para1 { text-align: left; color: BLUE;}
Syntax: .classname Example: Here is the CSS rule that will be applied to the HTML element with class="scaler". .scaler { text-align: left; color: blue;}
Syntax: selector1 > selector2 Example: Here is a CSS rule that will be applied to HTML elements (<p>) that are children of a <div> element. div > p { background-color: blue;} |
|