.html · text/html

HTML: HyperText Markup Language

HTML5 defines semantic document structure, hyperlinks, tables, and multimedia layout for browsers and rich-text editors.

Quick Answer: HTML5 defines semantic document structure, hyperlinks, tables, and multimedia layout for browsers and rich-text editors. Web pages, rich-text clipboard payloads, email templates, and sanitized rendered Markdown embeds.

Structure typeMarkup
Human readabilityMedium
Nesting supportYes
LLM token efficiencyLow
File extension.html
MIME typetext/html
Best forWeb pages, rich-text clipboard payloads, email templates, and sanitized rendered Markdown embeds.

Strengths

  • Universal rendering engine across every browser and rich-text editor
  • Supports full CSS styling, semantic landmarks, tables, and ARIA metadata
  • Copies seamlessly as formatted Rich Text into Word, Notion, and Gmail

Trade-offs

  • Navigation bars, scripts, and CSS classes bloat LLM token usage severely
  • Untrusted HTML must be sanitized with DOMPurify to prevent XSS injection
  • Noisy to author or inspect manually compared to Markdown

References

Convert & clean HTML locally

Related engineering guides

Related Formats

All 24 formats

HTML frequently asked questions

Why strip <script>, <style>, and <nav> tags before feeding HTML to an LLM?

Boilerplate navigation, inline scripts, and CSS often account for 60%–85% of raw webpage tokens while diluting retrieval quality.

How does TxtTo keep Markdown-to-HTML output safe?

TxtTo passes rendered HTML through DOMPurify locally in your browser to strip dangerous event handlers and script tags by default.

How do I decode HTML entities like &amp; or &mdash; into plain text?

Use Strip HTML Tags with entity decoding enabled to convert named and numeric HTML entities back into readable UTF-8 text.