CSS : Selector

CSS Selector
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
figure 2: CSS Implementation (Test 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

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...