Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

Metadata and SEO in relation to CSS

CSS describes document presentation, not document metadata or search-engine directives. Distinguish content appearance, HTML semantics, and document metadata; styling alone does not establish SEO outcomes.

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

Syntax

/* No CSS syntax defines document metadata or SEO directives. */

The label metadata and SEO describes a boundary of CSS responsibility here, not a language property or rule. CSS controls the rendering of structured documents. The example defines the document title and description in HTML using title and meta; the CSS rule concerns only the presentation of h1.

Appearance is not semantics. Setting display: block does not turn an element into a heading. CSS Display distinguishes the element tree from the box tree generated from it: display controls the latter, not the meaning of elements in the document language.

display: none makes an element and its descendants generate no boxes or text sequences in layout. Do not infer indexing or ranking outcomes from this: CSS Display does not specify search-engine behavior. Do not treat hiding content as an SEO directive.

The example separates metadata from visible content and its styling. Disabling the stylesheet should leave the title and description unchanged. This is a local test of layer responsibilities, not an SEO test; the example still requires verification in the target browser.

Examples

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Garden notes</title>
  <meta name="description" content="Notes about growing herbs.">
  <style>
    h1 { display: block; font-size: 24px; }
  </style>
</head>
<body>
  <h1>Garden notes</h1>
  <p>Notes about growing herbs.</p>
</body>
</html>

Result

Document title: Garden notes
Description metadata: Notes about growing herbs.
Visible heading: Garden notes
Visible paragraph: Notes about growing herbs.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources