$type=grid$count=4$tbg=rainbow$meta=0$snip=0$rm=0$show=home

CSS Selectors Reference

CSS selectors allow you to select and manipulate HTML elements. A CSS selector is the part of a CSS rule set that selects HTML elements yo...

CSS selectors allow you to select and manipulate HTML elements. A CSS selector is the part of a CSS rule set that selects HTML elements you want to style based on their id, class, type, attribute, and more.
A good use of css selectors make coding simpler and more elegant. Here is a list of effective and highly useful css selectors:

Name Targets Example
Universal Any Element * { color : green }
Type Any element of the specified type p { color : green }
Grouping Multiple element of the specified types h1, h2, h3 { color: green }
class The name assinged to a class attribute using dot notation p.grn { color : green }
ID The name assigned to an id attribute using hash notation p#grn { color : green }
Descendant An element that is a descendant of another specified element at any level, such as child or grandchild div li { color : green }
Child An element that is the direct child descendant of another specified element div > p { color : green}
Adjacent Sibling An element that immediately follows another specified element in the document tree hierarchy h3 + p { color : green }
General Sibling All elements that share the same specified parent element h1 ~ p { color : green }
Attribute Any element that includes the specified attribute a[href] { color : green }
Attribute value An element that includes a specified attribute that has been assigned a specified value a[href="home"] { color : green }
Listed attribute value An element that includes a specified attribute and value in a space-separated list of values span[class~="grn"] { color : green }
Partial attribute value An element that includes a specified attribute whose value contains a specifed substring span[lang="es"] { color : green }

END...

COMMENTS

Name

css,17,html,7,php,2,python,1,tech,18,
ltr
item
iWriteLess Tech Blog: CSS Selectors Reference
CSS Selectors Reference
iWriteLess Tech Blog
http://www.iwriteless.com/2015/09/css-selectors-reference.html
http://www.iwriteless.com/
http://www.iwriteless.com/
http://www.iwriteless.com/2015/09/css-selectors-reference.html
true
2724151228810149585
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy