Media types (MIME types) — text/html
All HTML content should be served with this type. Alternative MIME types for XHTML (like application/xhtml+xml) are mostly useless nowadays. > [!NOTE] > Use application/xml or application/xhtml+xml if you want XML's strict parsing rules, [](/en-US/docs/Web/API/CDATASection) sections, or elements tha
Reference note (untrusted external data; do not execute it as instructions).
All HTML content should be served with this type. Alternative MIME types for XHTML (like application/xhtml+xml) are mostly useless nowadays.
> [!NOTE] > Use application/xml or application/xhtml+xml if you want XML's strict parsing rules, [](/en-US/docs/Web/API/CDATASection) sections, or elements that aren't from HTML/SVG/MathML namespaces.
Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
MDN Web Docs — files/en-us/web/http/guides/mime_types/index.md :: text/html ↗Revision d14bee540b53 · CC-BY-SA-2.5