dionidium.com

Wayne Burkett's Weblog | Home

Extending XHTML
05:46PM CST September 07, 2003

The html element's id attribute, we recently discovered, is missing from XHTML 1.1. Anne van Kesteren noted today that it is possible to use the id attribute on the root element by extending XHTML's DTD. Adding attributes, it turns out, is quite easy. Anne's solution:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/tr/xhtml11/DTD/xhtml11.dtd" 
[ <!ATTLIST html id ID #IMPLIED > ]>

We're using this fix to include our CSS Signature in XHTML 1.1 documents.