Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 5788

CSS

:focus-visible — conditional focus indicator

The :focus-visible pseudo-class matches a focused element when the browser determines that it should be visibly indicated.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:focus-within — focus on an element or its descendant

The :focus-within pseudo-class matches an element with focus or a focused descendant, letting you highlight an entire control group.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:fullscreen — an element in fullscreen state

The :fullscreen pseudo-class selects elements in fullscreen state. It lets you change their appearance during fullscreen presentation, but does not itself enter fullscreen mode.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:future — the future timeline pseudo-class

The :future pseudo-class identifies content after the current position on a host-defined timeline. In WebVTT, it styles future portions of an active cue through ::cue(:future); it does not select HTML elements that will be created later.

Advanced · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

::grammar-error — highlighting grammatical errors

The ::grammar-error pseudo-element styles text ranges that the browser has flagged as grammatically incorrect. It does not perform grammar checking itself.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:has() — relational pseudo-class

:has() selects an element based on its relationships with other elements. Its arguments are relative selectors evaluated against the element being tested.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

::highlight() — styling custom text highlights

The ::highlight() pseudo-element styles text ranges registered through the CSS Custom Highlight API without adding wrapper elements. CSS defines the appearance, while JavaScript creates the ranges and registers the highlight under a name.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:host — styling a Shadow DOM host

The :host pseudo-class lets a stylesheet inside Shadow DOM select its host element. Outside a shadow-tree context, it matches nothing.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:host() — conditionally selecting a Shadow DOM host

The :host() pseudo-class selects a Shadow DOM host element when it matches the selector inside the parentheses. It operates in the context of that host’s shadow tree, letting host styles depend on a class, attribute, or another condition.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:hover — the pointer hover pseudo-class

The :hover pseudo-class matches an element designated with a pointing device, such as a mouse pointer, without requiring a click. It lets you change appearance while pointing, but must not be the only way to access important content or functionality.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

ID selector — #id

The #id selector matches an element by its identifier. Learn its syntax, specificity, and what ID uniqueness means for matching.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:indeterminate — indeterminate-state pseudo-class

The :indeterminate pseudo-class matches controls in an indeterminate state: appropriately configured checkboxes, radio buttons in a group with no selection, and progress elements without a value attribute. It does not simply mean “unchecked”.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:in-range — a value within permitted bounds

The :in-range pseudo-class selects controls with range limitations that violate neither the lower nor the upper bound. It does not mean that the field satisfies every validity constraint.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

::interest-button — an additional interest indicator

A pseudo-element providing an additional way to show interest in an element, for example to reveal supplementary information.

Advanced · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:interest-source — the current interest source

The :interest-source pseudo-class selects a source the user is currently showing interest in, not every element with interestfor.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:interest-target — target of active interest

The :interest-target pseudo-class selects a target associated with a source in which the user is currently showing interest. The association alone is insufficient.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:invalid — an element failing validation constraints

The CSS :invalid pseudo-class matches elements that fail data-validation constraints. It can highlight invalid values or empty required fields, including before the user has interacted with them.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:is() — matching any selector

The :is() pseudo-class groups alternative selectors. It takes the highest argument specificity, including arguments that do not match.

Intermediate · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:lang() — selecting elements by content language

The :lang() pseudo-class selects elements by their content language, including language determined from an ancestor. It enables language-specific styling without adding a lang attribute to every element.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:last-child — the last element among siblings

The :last-child pseudo-class selects an element that is last among its element siblings. It tests tree position, not visual order.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:last-of-type — last element of its type

The :last-of-type pseudo-class selects the last element of its type among siblings, not necessarily the last child.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:left — left-page pseudo-class

The :left pseudo-class in an @page selector selects left-hand pages of a paginated document. It allows different margins, such as a larger right margin for binding. It does not select HTML elements.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

:link — unvisited links

The `:link` pseudo-class selects hyperlinks the browser treats as unvisited. It does not select `a` elements without an `href` attribute.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
CSS

::marker — list marker pseudo-element

The ::marker pseudo-element styles a list item's bullet or number independently of its text. It supports a limited set of properties, including color and font properties.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required