MIME Types Reference

text/html

The MIME type for HTML documents, the standard markup language for web pages.

What Is This?

The text/html MIME type indicates that the content is an HTML document. When a browser receives text/html, it parses and renders the content as a web page, executing embedded CSS and JavaScript. It is the primary content type of the World Wide Web.

Common Uses

1

Serving web pages from web servers

2

Email body content in HTML format

3

Documentation and help pages

4

Server-rendered web applications

Examples

Browser Support

Supported by all browsers. HTML is the foundational language of the web.

File Extension

The .html file extension maps to text/html as its MIME type.

Related Entries

More from this reference:

Frequently Asked Questions

What is the difference between text/html and application/xhtml+xml?

text/html is the standard for HTML documents and is more forgiving of syntax errors. application/xhtml+xml requires strict XML parsing and will fail on malformed markup. Most websites use text/html.

Should I use text/html or text/plain for HTML?

Always use text/html. Using text/plain will cause the browser to display the HTML source code as plain text instead of rendering the page.