Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Programming General (http://siteownersforums.com/forumdisplay.php?f=44)
-   -   What are selectors in CSS? (http://siteownersforums.com/showthread.php?t=146049)

Bates John 09-28-2014 10:27 PM

What are selectors in CSS?
 
Selectors help to select an element to which you want to apply a style. For example below is a simple style called as ‘intro” which applies red color to background of a HTML element.
Collapse | Copy Code



To apply the above “intro” style to div we can use the “class” selector as shown in the below figure.
Collapse | Copy Code


My name is Shivprasad koirala.


I write interview questions.



jameskamroon1 09-29-2014 04:14 AM

They are following:
1. Id selector
2. Class selector
3. Element selector
4. Grouping Selector.

Alekyap 09-29-2014 04:51 AM

selectors in CSS are as follows:
1. Universal selector
2. Type selectors
3. Descendant selectors
4. Child selectors
5. Adjacent sibling selectors
6. Attribute selectors
7. ID selectors

softech 10-09-2014 11:23 PM

Thanks for Sharing...

johnstyle 10-13-2014 02:46 AM

For reference w3schools is the best place


All times are GMT -7. The time now is 04:34 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.