Saturday, 28 June 2014

CSS Selectors


CSS selectors are used to select HTML elements based on their id, classes, types, attributes, values of attributes etc.




CSS Selectors are of different types:-
  1. Element selector
  2. ID selector
  3. Class selector
  4. Grouping selector


  GROUPING SELECTOR

  • It is used to minimize the code.
  • To group selectors, separate each selector with a comma.






then we have output as







ID Selector


  • it is used to select  the id attribute of an HTML tag to find the specific element.
  • find an element with a specific id, write a hash character, followed by the id of the element.

0 comments:

Post a Comment