text/*
text/html
File extensions: .html, .htm
HyperText Markup Language — the format of every web page.
What is text/html?
text/html is the media type served by every ordinary web page. The browser parses the body as HTML, applies CSS, and runs any JavaScript found inside.
Typical usage
Web pages, HTML fragments returned by HTMX / Turbo endpoints, email bodies.
Common gotchas
Always include charset=utf-8 (or serve UTF-8 declared via <meta charset>) — the historical default of ISO-8859-1 breaks any non-ASCII content.
HTTP header example
Response header
Content-Type: text/html; charset=utf-8Reference
HTML Living Standard
Frequently asked questions
What is the text/html MIME type?
text/html is the media type served by every ordinary web page. The browser parses the body as HTML, applies CSS, and runs any JavaScript found inside.
What file extension does text/html use?
Files served as text/html typically use the extensions .html, .htm. The most common is .html.
How do I set the Content-Type for text/html?
Send the HTTP response header Content-Type: text/html; charset=utf-8. Web pages, HTML fragments returned by HTMX / Turbo endpoints, email bodies.
Is text/html an official MIME type?
Yes. text/html is officially registered with IANA (HTML Living Standard), so standards-conformant clients recognize it.
What are common mistakes with text/html?
Always include charset=utf-8 (or serve UTF-8 declared via <meta charset>) — the historical default of ISO-8859-1 breaks any non-ASCII content.