XHTML5 Full Demo

This page demonstrates XHTML5 features: strict XML syntax, new media types, elt(), and document.q/document.qs. Purpose: readability and flexibility for humans and machines.

Audio Examples

Self-closing audio (polyfill makes it work):

Standard container:

Video Examples

Self-closing video (polyfill applies):

<video controls="controls" alt="Sorry, video could not be found" src="https://www.example.com/video.mp4" />

Container video (standard syntax example):

<video controls="controls">
        <source src="https://www.example.com/video.mp4" type="video/mp4" />
     <onerror>
        Your browser cannot play this video.
    </onerror>
</video>
    

Also, this can be done with <embed> elements as well.

Embed & Object Description

XHTML5 supports:

Proposal: allow <img> and <embed>/<object> to support <source> and <onerror> too.

elt() Demo

New Media Types

Future Improvements

XHTML5 will evolve with full polyfill coverage, more media types, and enhanced XML semantics. Self-closing audio/video makes it as easy as <img />, with <onerror> for fallback rendering on non-self-closing ones.

Polyfill used: xhtml5.js