CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress
CSS Reference

Quick Reference

This is a quick reference list of CSS pseudo-classes used to select HTML elements for styling.

CSS – :checked Selector

The :checked selector matches every checked input element for radio buttons, checkboxes, and option elements.

CSS – :first-child Selector

The :first-child selector selects all HTML elements of a specified type that are also the first child of their parent element.

CSS – : empty Selector

The :empty selector selects empty HTML elements, which means an element without any child elements or text.

CSS – :hover Selector

The :hover selector selects elements when you mouse over them, and is commonly used for links and images with links, but can be used on any element.

CSS – :in-range Selector

The :in-range selector selects elements with a value that is within a specified range, and only works for input elements with min/max attributes.

CSS – :invalid Selector

The :invalid selector selects form elements with a value that does not validate according to the element’s settings.

CSS – :lang Selector

The :lang selector is used to select elements with a lang attribute with a specified value (e.g., lang = “en” or lang = “en-us”).

CSS – :last-child Selector

The :last-child selector selects all HTML elements of a specified type that are also the last child of their parent element.

CSS – :link Selector

The :link selector is used to select unvisited links, and will not style links you have already visited.

CSS – :nth-child() Selector

The :nth-child() selector selects all specified elements that are the nth child of their parent, regardless of all the children’s types.

CSS – :only-child Selector

The :only-child selector selects every element that is the only child of its parent. If the parent has multiple child elements, it will NOT be selected.

CSS – :out-of-range Selector

The :out-of-range selector selects elements with a value that is NOT within a specified range, and only works for input elements with min/max attributes.

CSS – :read-write Selector

The :read-write selector selects form inputs which are “readable” and “writeable” (those with no “readonly” or “disabled” attributes).

CSS – :target Selector

The :target selector selects the current active target anchor element on the page (the element being linked to).

CSS – :valid Selector

The :valid selector selects form inputs with a value that properly validates according to the element’s settings.

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

CSS
HTML
JavaScript
jQuery
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.