CKTIS / CSS
Document semantics and CSS
Document semantics describes what elements mean. CSS controls their presentation; changing display does not change the meaning defined by the document language.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
selector { display: value; }Document semantics (document semantics) is the meaning of elements defined by the document language, rather than their appearance. CSS builds a box tree from the element tree; these structures are not the same.
In the example, h1 receives display: inline and an inherited font. This changes its presentation but does not turn the heading into ordinary text. Choose elements for their meaning and use CSS for appearance.
Preserving meaning does not guarantee accessibility: display: none also affects interactivity and speech output. Check appearance and the information exposed to assistive technologies separately.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Document semantics</title>
<style>
h1 { display: inline; font: inherit; }
</style>
<h1>Overview</h1>
</html>Result
Overview
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.