Headings
Paragraphs & Inline Text
Code Blocks
Blockquotes
Lists
Unordered Lists
Ordered Lists
Horizontal Rule
Typography Styles
Headings
Six levels of headings (h1-h6) with automatic sizing and spacing
Text Formatting
Strong, emphasis, links, and inline code with proper contrast
Code
Inline code and code blocks with monospace font
Lists
Ordered and unordered lists with proper indentation
Inline Elements
Text Emphasis
Text Emphasis
<strong>- Bold text with semantic meaning for importance<em>- Italic text with semantic meaning for emphasis<b>- Bold text for visual styling only<i>- Italic text for visual styling only
Code & Technical
Code & Technical
<code>- Inline code snippets with monospace font<pre>- Preformatted text blocks<kbd>- Keyboard input<samp>- Sample output<var>- Variables
Links
Links
<a>- Hyperlinks with underline and color- Hover state with transition
- Visited state styling
- Focus outline for accessibility
Other Elements
Other Elements
<mark>- Highlighted text<small>- Fine print<del>- Deleted text<ins>- Inserted text<sub>- Subscript<sup>- Superscript
Complete Example
Semantic HTML
Oat UI encourages semantic HTML for better accessibility and SEO:Use Headings Hierarchically
Start with
<h1> and use heading levels in order (don’t skip levels)Strong vs Bold
Use
<strong> for importance, <b> for visual styling onlyEm vs Italic
Use
<em> for emphasis, <i> for visual styling onlyLists for Lists
Use
<ul> or <ol> for lists, not <div> elementsAccessibility
- Proper heading hierarchy for screen readers
- Semantic elements convey meaning, not just appearance
- Link text should be descriptive (not “click here”)
- Code blocks use
<pre><code>for proper announcement - Lists use proper
<ul>/<ol>structure - Sufficient color contrast for text
- Focus states on interactive elements
Best Practices
Use semantic HTML elements that match the content meaning
Maintain proper heading hierarchy (h1 → h2 → h3, etc.)
Use
<strong> and <em> for semantic meaning, not stylingWrite descriptive link text
Use
<code> for inline code, <pre><code> for blocksCSS Variables
Typography uses the standard Oat UI CSS variables:--text-1through--text-9- Font sizes (h1 uses larger, body uses middle range)--leading-*- Line height values--font-normal,--font-medium,--font-bold- Font weights--foreground- Main text color--muted-foreground- Secondary text color--primary- Link color--border- Border color for<hr>