Sideway
output.to from Sideway



CSS Selector List


Draft for Information Only

CSS Selectors

In Cascading Style Sheet, every CSS rule consists of a selector and a declaration, The declaration is the rendering information to be applied to the selected elements while the selector is the pattern used to select the matched elements to be applied.

The CSS Selectors in alphabetic order

Property NameDescriptionCSS LevelRefRemark 
#idto match all elements with an "id" id1,2.1last updated 2019/1/11
*to match all elements2.1last updated 2019/1/11
.classto match all elements with a "class" class1,2.1last updated 2019/1/11
::after (:after)Insert something after the content of each <p> elementlast updated 2019/1/11
::before (:before)Insert something before the content of each <p> elementlast updated 2019/1/11
::cue (:cue)last updated 2019/1/11
::grammar-errorlast updated 2019/1/11
::markerlast updated 2019/1/11
::placeholderto select input elements with placeholder textlast updated 2019/1/11
::selectionto select the portion of an element that is selected by a userlast updated 2019/1/11
::slotted()last updated 2019/1/11
::spelling-errorlast updated 2019/1/11
:activeto select the active link1,2.1last updated 2019/1/11
:any-linklast updated 2019/1/11
:backdroplast updated 2019/1/11
:blanklast updated 2019/1/11
:checkedto select every checked <input> elementlast updated 2019/1/11
:currentlast updated 2019/1/11
:defaultto select the default <input> elementlast updated 2019/1/11
:definedlast updated 2019/1/11
:dir()last updated 2019/1/11
:disabledto select every disabled <input> elementlast updated 2019/1/11
:droplast updated 2019/1/11
:emptyto select every <p> element that has no children (including text nodes)last updated 2019/1/11
:enabledto select every enabled <input> elementlast updated 2019/1/11
:firstlast updated 2019/1/11
:first-childto select every <p> element that is the first child of its parent2.1last updated 2019/1/11
:first-letter (::first-letter)to select the first letter of every <p> element1,2.1last updated 2019/1/11
:first-line (::first-line)to select the first line of every <p> element1,2.1last updated 2019/1/11
:first-of-typeto select every <p> element that is the first <p> element of its parentlast updated 2019/1/11
:focusto select the input element which has focus2.1last updated 2019/1/11
:focus-visiblelast updated 2019/1/11
:focus-withinlast updated 2019/1/11
:fullscreenlast updated 2019/1/11
:futurelast updated 2019/1/11
:has()last updated 2019/1/11
:hostlast updated 2019/1/11
:host()last updated 2019/1/11
:host-context()last updated 2019/1/11
:hoverto select links on mouse over2.1last updated 2019/1/11
:indeterminateto select input elements that are in an indeterminate statelast updated 2019/1/11
:in-rangeto select input elements with a value within a specified rangelast updated 2019/1/11
:invalidto select all input elements with an invalid valuelast updated 2019/1/11
:is()last updated 2019/1/11
:lang(language)to select every <p> element with a lang attribute equal to "it" (Italian)2.1last updated 2019/1/11
:last-childto select every <p> element that is the last child of its parentlast updated 2019/1/11
:last-of-typeto select every <p> element that is the last <p> element of its parentlast updated 2019/1/11
:leftlast updated 2019/1/11
:linkto select all unvisited links1,2.1last updated 2019/1/11
:local-linklast updated 2019/1/11
:not(selector)to select every element that is not a <p> elementlast updated 2019/1/11
:nth-child(n)to select every <p> element that is the second child of its parentlast updated 2019/1/11
:nth-last-child(n)to select every <p> element that is the second child of its parent, counting from the last childlast updated 2019/1/11
:nth-last-of-type(n)to select every <p> element that is the second <p> element of its parent, counting from the last childlast updated 2019/1/11
:nth-of-type(n)to select every <p> element that is the second <p> element of its parentlast updated 2019/1/11
:only-childto select every <p> element that is the only child of its parentlast updated 2019/1/11
:only-of-typeto select every <p> element that is the only <p> element of its parentlast updated 2019/1/11
:optionalto select input elements with no "required" attributelast updated 2019/1/11
:out-of-rangeto select input elements with a value outside a specified rangelast updated 2019/1/11
:pastlast updated 2019/1/11
:placeholder-shownlast updated 2019/1/11
:read-onlyto select input elements with the "readonly" attribute specifiedlast updated 2019/1/11
:read-writeto select input elements with the "readonly" attribute NOT specifiedlast updated 2019/1/11
:requiredto select input elements with the "required" attribute specifiedlast updated 2019/1/11
:rightlast updated 2019/1/11
:rootto select the document's root elementlast updated 2019/1/11
:scopelast updated 2019/1/11
:targetto select the current active #news element (clicked on a URL containing that anchor name)last updated 2019/1/11
:target-withinlast updated 2019/1/11
:user-invalidlast updated 2019/1/11
:validto select all input elements with a valid valuelast updated 2019/1/11
:visitedto select all visited links1,2.1last updated 2019/1/11
[attribute$=value]to match all elements with [attribute] attribute containing word ends with string "value"last updated 2019/1/11
[attribute*=value]to match all elements with [attribute] attribute containing word with substring "value" at the start, end or in the middle of the word.last updated 2019/1/11
[attribute]to match all elements with an "attribute" attribute2.1last updated 2019/1/11
[attribute^=value]to match all elements with [attribute] attribute containing word begins with string "value"last updated 2019/1/11
[attribute|=value]to match all elements with [attribute] attribute starting with the word "value" of either exactly "value" or "value" immediately followed by "-".2.1last updated 2019/1/11
[attribute~=value]to match all elements with [attribute] attribute containing the word "value"2.1last updated 2019/1/11
[attribute=value]to match all elements with [attribute] attribute equal to "value"2.1last updated 2019/1/11
columnA||tablecellBto match all <tablecellB> elements that belong to the scope of the <columnA> element.last updated 2019/1/11
elementA elementBto match all <elementB> elements that are nested inside the <elementA> element1,2.1last updated 2019/1/11
elementA,elementB,⋯to match all <elementA>, <elementB>, <⋯>, ⋯ elements1,2.1last updated 2019/1/11
elementA~elementBto match all <elementB> elements that are preceded by the <elementA> element but not necessarily immediately inside the same parent element.last updated 2019/1/11
elementA+elementBto match all <elementB> elements that are preceded immediately by the <elementA> element inside the same parent element.2.1last updated 2019/1/11
elementA>elementBto match all <elementB> elements that are direct children of the parent <elementA> element2.1last updated 2019/1/11
elementnameto match all <elementname> elements1,2.1last updated 2019/1/11
nth-col()last updated 2019/1/11
nth-last-col()last updated 2019/1/11

©sideway
close

References

  1. http://www.w3.org/TR/1999/REC-html401-1999, 1999, HTML 4.01 Specification: W3C Recommendation, updated 24 December 1999
close

ID: 190300028 Last Updated: 2019/3/28 Revision: Ref:

IMAGE

Home (5)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (336)

Reference (66)

Computer

Hardware (149)

Software

Application (187)

Digitization (24)

Numeric (19)

Programming

Web (648)new

CSS (SC)

ASP.NET (SC)

Regular Expression (SC)

HTML

Knowledge Base

Common Color (SC)

Html Entity (Unicode) (SC)

Html 401 Special (SC)

OS (389)

MS Windows

Windows10 (SC)

.NET Framework (SC)

DeskTop (7)

Knowledge

Mathematics

Formulas (8)

Number Theory (206)

Algebra (20)

Trigonometry (18)

Geometry (18)

Calculus (67)

Complex Analysis (21)

Engineering

Tables (8)

Mechanical

Mechanics (1)

Rigid Bodies

Statics (92)

Dynamics (37)

Fluid (5)

Fluid Kinematics (5)

Control

Process Control (1)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)


Copyright © 2000-2019 Sideway . All rights reserved Disclaimers last modified on 10 Feb 2019