FileHint

text/html

The MIME type for HTML documents. Browsers begin rendering immediately when they receive it.

Typical extensions

Primary uses

  • HTML responses served by web servers
  • HTML part of multipart/alternative email
  • Locally saved web pages

In a browser

Browsers construct the DOM and paint as soon as they receive text/html. Without an explicit charset, they fall back to BOM sniffing or heuristic detection.

On a server

Return `Content-Type: text/html; charset=utf-8` and pair with `X-Content-Type-Options: nosniff` to defeat MIME sniffing attacks.

In email

HTML email bodies rely on this type. Images are usually referenced via CID; remote references trigger load-remote-content warnings.

References