CSS allow to specify selector HTML element, "ID" and "Class"
- Selector HTML element is used to specify all of the HTML element (one write, all effected)
- Selector ID is used to specify a unique ID of the HTML element (one webpage, one id)
- Selector Class is used to specify group of the HTML element that select a specify Class (one write, use anywhere)
Example Selector ID
figure 1: CSS Implementation (Test Selector ID)
Example Selector Class
Group Selector
If an element has the same style, it can grouped selectors separate by ,
Example Group Selector
div, p { color: green; }
Introduction << Previous Chapter || Next Chapter >> Basic Attribute
Reference : http://www.w3schools.com/
No comments:
Post a Comment