Styling Default HTML

Token-driven defaults for semantic documents, rich content, forms, tables, disclosure, and long-form typography.

CSS Tags gives native HTML a coherent visual hierarchy before you introduce a component abstraction. Headings, paragraphs, lists, links, quotes, code, tables, forms, and disclosure elements consume the same theme and typography tokens as the component layer.

Full semantic document

A complete semantic HTML article

This example uses native content elements inside one prose scope. Resize it, tab through the controls, open the disclosure, and inspect the generated markup.

Field guide · Updated

Designing content that survives its interface

Semantic HTML carries structure, meaning, and useful browser behavior before a design system adds its visual voice.

Start with durable foundations

A document can combine navigable links, highlighted context, and abbreviations such as CSS without inventing presentation-only wrappers.

  • Headings expose the document hierarchy.
  • Paragraphs inherit readable measure and rhythm.
  • Lists preserve relationships between ideas.

    • Nested items retain their indentation.
    • Long labels wrap without widening the article.

A practical publishing sequence

  1. Write the content in source order.
  2. Choose elements for their meaning and native behavior.
  3. Add component hooks only where the content model needs them.

The strongest default is one that remains useful when every optional enhancement is removed.

CSS Tags design principle

Reference content

Semantic HTML
Elements chosen for structure, meaning, and built-in interaction.
Prose scope
A readable measure and vertical rhythm applied with .prose or [data-prose].
article[data-prose] {
—measure-prose: 68ch;
—space-flow: 1em;
}
A prose scope can be themed without changing the authored markup.
Native elements and their jobs
ElementPurpose
blockquoteA quotation from another source.
figureSelf-contained media or referenced content.
detailsNative disclosure without JavaScript.
Why use a prose scope?

Application shells and authored documents need different measures and spacing. The scope lets native content opt into long-form rhythm without changing its semantics.


Native form controls

Article feedback
Published by the CSS Tags documentation team.

Global defaults and prose scopes

Importing index.css includes the reset, theme, defaults, typography, and component layers in their intended order. Native elements receive accessible focus treatments, semantic colors, type tokens, and resilient overflow rules.

Use a prose scope for an authored document inside an application shell:

<article data-prose>...</article>
<article data-prose="compact">...</article>
<article data-prose="wide">...</article>
<article class="prose prose-unbounded">...</article>

The scope controls measure and relationships between unlike elements. It does not replace their native semantics or behavior.

What is styled

  • Body copy and the h1h6 hierarchy
  • Paragraphs, links, emphasis, strong text, marks, and abbreviations
  • Ordered, unordered, nested, task, and definition lists
  • Inline code, preformatted blocks, keyboard input, and sample output
  • Blockquotes, figures, captions, horizontal rules, and callouts
  • Native tables, captions, headings, and overflow behavior
  • Fieldsets, legends, labels, inputs, selects, textareas, and buttons
  • Details/summary disclosure, progress, meter, media, and footnotes

Native status and technical output

Progress, measurement, keyboard input, sample output, and live status keep their browser semantics while sharing the document's typography and color tokens.

Publication check

42 of 60 pages

92%

Press Ctrl + K to open search. A successful run reports Build audit passed.

Result: All semantic checks passed.

Theme the system, not the fragment

Prefer semantic and hierarchy tokens over selectors tied to one CMS template:

:root {
--font-size-h1: clamp(2.5rem, 7vw, 4.5rem);
--measure-prose: 68ch;
--line-height-prose: 1.7;
--space-flow: 1.05em;
--space-heading-top: 1.8em;
--prose-link-wrap: anywhere;
}

This keeps Markdown, CMS, hand-authored HTML, and framework-rendered content on the same typographic system.

Authoring checklist

  1. Preserve a logical heading order; do not choose headings by visual size.
  2. Use lists for related items, tables for tabular relationships, and definitions for term/value content.
  3. Associate every form control with a visible label.
  4. Give tables captions and meaningful row/column headings.
  5. Provide captions, alternatives, or transcripts for media.
  6. Test narrow containers, 200% text, keyboard navigation, RTL, and dark mode.