XHTML Document — HTML reformulated as a strict XML application.
Quick facts
What is .xhtml
A .xhtml file is a XHTML Document — HTML reformulated as a strict XML application.
In the mime-db registry it maps to application/xhtml+xml, and it is marked as compressible. When serving .xhtml over HTTP, set the Content-Type header as shown in Developer info below.
Related entities: it maps to application/xhtml+xml and is used by HTML among others — and is delivered over HTTP via the Content-Type header.
How to open .xhtml files
Developer info
When served over HTTP, responses should set the following header:
Content-Type: application/xhtml+xml
Common software that reads/writes .xhtml:
Relation chain
Related extensions
Related MIME types
Related programming languages
Common uses
How to edit .xhtml files
How to create .xhtml files
Frequently asked questions
Common options include Chrome, VS Code. You can also open many of these files with built-in viewers or a browser.
Create a new file in any text editor or the app that owns the format and save it with the .xhtml extension.
application/xhtml+xml is the media type identifier used for .xhtml files during network transfer (for example in the HTTP Content-Type header).
Sources & standards
Updated 2026-08-18
Explore this reference