rem — a unit relative to the root font size
The rem unit expresses a length relative to the document root element’s computed font-size. It lets text sizes and spacing share one reference size, independently of the parent element’s font size.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
The rem unit expresses a length relative to the document root element’s computed font-size. It lets text sizes and spacing share one reference size, independently of the parent element’s font size.
The rex unit expresses a length relative to the root element's font x-height rather than the current element's font.
The ric unit equals ic on the document’s root element. It sizes lengths using the root’s ideographic metrics rather than a descendant’s font size.
The rlh unit expresses a length relative to the root element’s line-height, not that of the element using it.
The `s` unit represents seconds in CSS `<time>` values. A value of `0.5s` equals `500ms`. It can be used, for example, to specify transition durations and delays.
The svh unit equals 1% of the small viewport height, calculated assuming that retractable browser interface elements are expanded.
The CSS length unit svmax equals 1% of the larger small-viewport dimension. It uses the viewport size with dynamically retractable browser interface elements expanded.
The CSS length unit svmin equals 1% of the smaller small-viewport dimension. It scales an element relative to width or height, assuming that dynamically retractable browser bars are expanded.
The svw unit represents 1% of the small viewport width, calculated assuming that dynamically expanding browser interface elements are expanded.
The `turn` unit expresses an angle as a number of complete revolutions. `1turn` equals `360deg`, and `0.25turn` is a right angle. Use it wherever the CSS syntax accepts an `<angle>`.
The vb unit represents 1% of the large viewport along the element’s block axis. That axis depends on writing-mode.
The CSS unit vh represents 1% of the large viewport height. It makes a length depend on the browser viewport rather than the size of a parent element.
The vi unit represents 1% of the large viewport’s dimension along the inline axis of the box it applies to. That box’s writing mode determines the axis.
The vmax length unit equals 1% of the larger dimension of the large viewport: its width or height. It scales an element relative to the longer axis, regardless of orientation.
The vmin length unit equals 1% of the smaller dimension of the large viewport. It scales an element against the page viewport’s width and height, not its parent.
The vw unit expresses a length relative to the large viewport width: 1vw is 1% of that width, independently of the parent's width.
The `abbr` attribute gives a `th` cell an alternative label for references to the header without replacing its visible contents.
`accept` tells the picker which file formats an `input type="file"` expects; it is not an upload security boundary.
The form attribute `accept-charset` selects the character encoding for submission; the conforming modern value is `UTF-8`.
The `accesskey` attribute supplies keyboard-shortcut candidates for an element, but the browser, operating system, and keyboard layout decide the actual key combination.
`action` names the form’s destination, but the submitting button can override it with its own `formaction`.
The `allow` attribute on `iframe` restricts or delegates browser features through Permissions Policy; it does not grant user consent.
The boolean attribute `allowfullscreen` delegates fullscreen capability to an `iframe`; it does not enter fullscreen by itself.
`alpha` is a boolean attribute of `input type="color"` that, in the standard, allows selecting a color’s transparency component.