Skip to content
XHTML

Document format

XHTML

XHTML expresses HTML documents using XML syntax. It uses the familiar web-document vocabulary while requiring well-formed markup and namespace-aware processing.

Learn more

Convert from XHTML

Available conversions · 4

Convert to XHTML

Available conversions · 8

All partners (8)

Conversion is available locally in your browser. VALIDATED records tested, bounded profiles; EXPERIMENTAL records provisional acceptance. Neither status promises complete preservation or support for every file.

What is the format?

XHTML expresses HTML documents using XML syntax. It uses the familiar web-document vocabulary while requiring well-formed markup and namespace-aware processing. It is useful where document pipelines need XML’s strictness. Changing an HTML filename to .xhtml does not fix unclosed tags or missing namespaces.

Technical profile

Extensions
.xhtml / .xht
Storage
XML document
Document model
HTML vocabulary with XML rules
MIME
application/xhtml+xml
Universal Text Conversion Engine (UTCE)
Source and target
Scope
Format properties ≠ converter coverage

The cards describe the file format. Conversion boundaries are explained below.

History and evolution

XHTML 1.0 became a W3C Recommendation in January 2000, reformulating HTML 4 in XML. Later work explored modular vocabularies, while mainstream browser evolution continued through HTML5. XML serialization remains important in EPUB and structured publishing. XHTML’s history is not a simple replacement of all HTML by XML.

  1. 2000

    XHTML 1.0 / W3C

    XHTML 1.0 became a W3C Recommendation in January 2000, reformulating HTML 4 in XML.

Related formats

Compare document models and their uses.

Technical architecture

Elements must nest correctly, attributes must be quoted and reserved characters escaped. The XHTML namespace identifies the vocabulary. The media type and parser determine whether XML rules or HTML error recovery apply. CSS and images remain separate resources unless embedded. Well-formedness does not imply complete accessibility or a valid publication package.

Real-world applications

EPUB chapters and XML-oriented publishing pipelines use XHTML for semantic prose. Editors can validate structure before packaging. A useful document uses real headings and meaningful links rather than visual styling alone; that structure can then support navigation and conversion into other prose formats.

Advantages and limitations

Strict parsing catches errors early and fits XML tools. The same strictness can stop processing at a malformed element that an HTML browser would repair. External dependencies and styles still limit portability. Syntax preservation is different from preserving the original page design.

Compatibility and software

XML editors, EPUB tools and capable browsers process XHTML, with behavior affected by the served content type. Do not validate an XML workflow only by checking that a browser displays the file. Keep referenced assets and namespace declarations intact when moving documents.

Conversion considerations

UTCE checks namespace-qualified XML input and applies its semantic HTML profile. It rejects unsafe entities and does not execute scripts or fetch external resources. Output retains admitted prose, references and local resources within that profile; CSS fidelity and arbitrary XML vocabularies are not implied.

Frequently asked questions

Why does XHTML reject a page that HTML displays?

XML requires well-formed structure; HTML defines error recovery. Fix nesting, quoting and namespaces rather than changing the filename.

Is XHTML itself an ebook?

It can be a chapter, but EPUB also needs package metadata, reading order, navigation and resources.

Sources and specifications