What is Selectors in CSS3?

Questions by sripri   answers by sripri

Showing Answers 1 - 4 of 4 Answers

Kunal

  • Aug 27th, 2014
 

There are 4 types of selectors, as below

Type Selectors correspond with HTML elements


ID Selectors are used by adding # in front of an elements ID


Class Selectors are used by adding a period in front of an elements ID


Descendant Selectors are similar to family trees; you start with the parent element you wish to select, add a space, and continue naming any interior elements until youre arrived at the specific element you wish to select

  Was this answer useful?  Yes

Anil Mhaske

  • Oct 3rd, 2014
 

Basically in css there are 2 selector 1.Id start with # symbol e.g. #div 2. Adding a period in front of any element e.g. .div

Muhammad Sohail Jaral

  • Oct 14th, 2014
 

There are three basic selector in CSS.

Code
  1.  

  2. 1: Select HTML element by TAG name e.g=> ( h { hight:10px; } )

  3.  

  4. 2: Select HTML element by element ID  e.g=> ( #headline { hight:10px; } )

  5.  

  6. 3: Apply CSS to elements by Class Attribute, mostly user this type to apply CSS to different rang of elements  e.g=> ( .HeadlineHight  { hight:10px; } )


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions