0% found this document useful (0 votes)
21 views1 page

Selector

This document provides a summary of CSS selectors in 3 sentences or less: The document lists different types of CSS selectors including element selectors, id and class selectors, child and sibling selectors, pseudo-class selectors, and attribute selectors. It also includes pseudo-classes that select elements based on conditions like :focus, :hover, :first-child, and selectors that match elements based on attributes, data types, states and structural relationships between elements in the DOM tree. The full list of selectors provides a concise overview of the different ways that CSS can select and style elements on a webpage.

Uploaded by

Sarah Gray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Selector

This document provides a summary of CSS selectors in 3 sentences or less: The document lists different types of CSS selectors including element selectors, id and class selectors, child and sibling selectors, pseudo-class selectors, and attribute selectors. It also includes pseudo-classes that select elements based on conditions like :focus, :hover, :first-child, and selectors that match elements based on attributes, data types, states and structural relationships between elements in the DOM tree. The full list of selectors provides a concise overview of the different ways that CSS can select and style elements on a webpage.

Uploaded by

Sarah Gray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Selector

*
#id
.class
.class,.class
element
el1,el2,el3

:first
:last
:even
:odd

:first-child
:first-of-type
:last-child
:last-of-type
:nth-child(n)
:nth-last-child(n)
:nth-of-type(n)
:nth-last-of-
type(n)
:only-child
:only-of-type

parent > child
parent descendant
element + next
element ~ siblings

:eq(index)
:gt(no)
:lt(no)
:not(selector)

:header
:animated
:focus
:contains(text)
:has(selector)
:empty
:parent
:hidden
:visible
:root
:lang(language)

[attribute]
[attribute=value]
[attribute!=value]
[attribute$=value]
[attribute|=value]
[attribute^=value]
[attribute~=value]
[attribute*=value]

:input
:text
:password
:radio
:checkbox
:submit
:reset
:button
:image
:file
:enabled
:disabled
:selected
:checked

You might also like