Monday, November 10, 2014

CSS selectors

CSS selectors

Selectors are important role for using CSS (Cascading Style Sheets) on web design.
Typically most common and widely selectors could been divided into 5 categories.


  • Types of selector Class
    ID, Universal and Pseudo-classes can be used to target different
    elements in HTML.
  • Class Selectors
    Classes can be applied to as many elements as you want, and CSS
    can be used to target them.
  • ID Selectors
    An ID can only be applied to one element in a document, and can be
    combined with classes.
  • Descendant Selectors
    Descendant selectors can be used to target elements based on the
    ancestors, for example a <h2> inside a <div> with a class of planet
  • Pseudo-Classes
    Pseudo-classes can be used to style elements based on user
    interaction, for example a link that has been visited.


No comments:

Post a Comment