There are several CSS selectors which are available in modern browsers. here I’m gonna talk about 5 of them!

###* This is one the most popular one! It will target every single element on the page. many developer use this to make margin & padding set to zero.

	*{
	margin:0;
	padding0;
}

Be carefull when using this. Ithis selector adds too much weight on the browser which may not be necessary.

###A + B This is an an adjacent selector. It targets only the element that is immediately preceded by the former element.

	div + p {
   color: red;
}

in this example, only first p tag inside each div in all document is targeted.

###A[title] This is an attributes selector, in the example below this will only select the anchor tags that have a title attribute. Those which don’t have a title attribute will not receive this styling.

	a[title] {
   color: red;
   font-size:18px;
}

###A[href=”#”] What if you want to be more specefic? The snippet below will target all anchor tags which link to http://google.com. All other anchor tags remain unaffected.

a[href="http://google.com"] {
  color: blue;
}

###A:not(selector) This is a negation pseudo class. For example if you want to select all paragraphs, except for the one which has an id of content. the example below will handle that task perfectly.

p:not(#content) {
   font-size:14px;
}

CSS has several selectors that can be usefull and make coding easier for developers. in future post I will write more about these selectors.