HTML5: DTD module for head

Here’s my first draft of the DTD module for the head element.

 

<!-- ========= head elements ========= -->

<!ELEMENT head (title, meta*, link*, style?, script*)>

<!ELEMENT title (#PCDATA)>

<!ELEMENT meta EMPTY>
<!ATTLIST meta
 id          ID             #IMPLIED
 http-equiv  CDATA          #IMPLIED
 name        CDATA          #IMPLIED
 content     CDATA          #REQUIRED
 scheme      CDATA          #IMPLIED
 >

<!ELEMENT link EMPTY>
<!ATTLIST link
 href        CDATA          #IMPLIED
 type        CDATA          #IMPLIED
 rel         CDATA          #IMPLIED
 rev         CDATA          #IMPLIED
 >

<!ELEMENT script (#PCDATA)>
<!ATTLIST script
 type        CDATA        #REQUIRED
 src         CDATA        #IMPLIED
 defer       (defer)        #IMPLIED
 async       (async)        #IMPLIED
 >

<!ELEMENT style (#PCDATA)>
<!ATTLIST style
 id          ID             #IMPLIED
 type        CDATA         #REQUIRED
 media       CDATA         #IMPLIED
 title       CDATA          #IMPLIED
 >

<!-- $Id: html5-head.mod 8263 2011-05-31 16:42:03Z sm $ -->

The script element has the new boolean attribute “async”. XHTML 1.0 already had the “defer” attribute, although it was not well known. I dropped the arbitrary order of the child elements in head. The title is mandatory, and the order of meta, link, script, style is fixed.

This entry was posted on 31/05/2011 in DTD and tagged , , . Bookmark the permalink. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “HTML5: DTD module for head”

  1. Dave Says:

    http://twitter.com/#!/diveintomark/status/75620541817556992

 
Creative Commons License
HTML5 DTD by Stefan Mintert/Linkwerk GmbH is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.