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

:autofill — a browser-autofilled input

The :autofill pseudo-class selects input elements filled automatically by the browser until the user changes their values. It lets you highlight that state; it does not simply mean that a field contains text.

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

::backdrop — background behind a top-layer element

The ::backdrop pseudo-element styles the background beneath an element rendered in the top layer, for example to dim a page behind a modal dialog.

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

::before — generated content before an element’s contents

The ::before pseudo-element creates styleable content before an element’s actual contents, inside that element. The content property specifies this content; :before is the backward-compatible spelling of the same pseudo-element.

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

:checked — checked form controls

The :checked pseudo-class matches currently checked checkboxes and radio buttons, as well as selected option elements. It follows the control’s current state rather than merely the presence of a checked attribute in HTML.

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

::checkmark — styling the checked indicator

The ::checkmark pseudo-element styles the checked indicator of checkboxes, radio buttons, and option elements using basic control appearance.

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

Child combinator (>)

The > combinator selects elements that are direct children of a specified parent. A > B matches B only when its parent matches A; it does not include descendants nested further down.

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

Class selector

The `.class` selector selects elements belonging to a named class. In HTML it matches an individual token in the `class` attribute, not a substring.

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

::column — column pseudo-element

`::column` represents a multi-column container’s columns, primarily as targets for snapping during scrolling.

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

::cue — styling WebVTT captions

The ::cue pseudo-element styles WebVTT captions; its argument-taking form selects particular text fragments.

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

:default — default form elements

The :default pseudo-class selects default interface elements, not necessarily the currently selected ones. It can highlight the default choice even after the user changes their selection.

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

:defined — the defined-element pseudo-class

The :defined pseudo-class selects elements considered defined by the document language. In HTML, it matches ordinary built-in elements and successfully constructed custom elements, allowing you to distinguish a component awaiting its definition from one that has been upgraded.

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

Descendant combinator

The selector `A B` matches an element `B` inside an ancestor `A`, regardless of how many levels deep it is nested.

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

::details-content — expandable content

The ::details-content pseudo-element styles the expandable portion of a details element without targeting its summary.

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

:dir() — directionality pseudo-class

The :dir() pseudo-class selects elements by directionality established through HTML rules, not the CSS direction property. It distinguishes ltr from rtl and accounts for inheritance and dir="auto".

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

:disabled — disabled-element pseudo-class

The :disabled pseudo-class selects elements that are actually disabled under HTML rules, not just elements carrying a disabled attribute. It lets you style a control's state but does not itself disable the control.

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

:empty — selecting empty elements

The :empty pseudo-class tests an element’s structure, not its appearance. Comments do not prevent matching, but child elements or text can. For whitespace, distinguish the rules in Selectors Level 3 from the Level 4 draft.

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

:enabled — elements in the enabled state

The :enabled pseudo-class selects elements that support an enabled state and are not disabled. It is not equivalent to lacking a disabled attribute or allowing value editing.

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

::file-selector-button — styling the file picker button

The `::file-selector-button` pseudo-element styles the button that opens the file picker in `input[type="file"]`. It targets only that button, not the whole control or the file picker dialog.

Basic · CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate
CSS

:first — first printed page

The :first page pseudo-class selects the first page of a document in paged layout, such as printing. Use it in an @page selector to give the first page a separate margin without changing subsequent pages.

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

:first-child — the first element among siblings

The :first-child pseudo-class matches an element that comes first among its element siblings. It does not mean “the first element of this type”: p:first-child will not match a paragraph preceded by a heading.

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

::first-letter — the first letter of text

The ::first-letter pseudo-element styles the first letter on the first formatted line, for example by changing its color or font size. The :first-letter spelling is a backward-compatible form of the same pseudo-element.

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

::first-line — the first formatted line

The ::first-line pseudo-element styles the first line of content after the browser lays out the text. Its scope depends on line breaking, not source-code lines. The :first-line spelling is an older, equivalent syntax.

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

The :first-of-type pseudo-class

:first-of-type selects the first element of its type among siblings, which is not necessarily its parent's first child.

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

:focus — the focused element

The :focus pseudo-class matches an element that has focus: the recipient of input, such as keyboard input. It lets you highlight a focused form field, but does not itself move focus or make an element capable of receiving it.

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