7.3. DOCTYPE Declaration

All XHTML MP documents must have the DOCTYPE declaration. It should be placed between the XML declaration and the <html> element. Below is the DOCTYPE declaration for XHTML MP. You can simply copy and paste it into your XHTML MP files.


<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">


The DOCTYPE declaration specifies the name of the DTD (Document Type Definition) and the URL to the DTD. The DTD contains information about the syntax of the markup language. It defines what elements and attributes can be used in the markup and the rules that they should be used. Validation tools can be used to check whether your XHTML MP document conforms to the XHTML MP language rules by comparing your XHTML MP document with the DTD specified in the DOCTYPE declaration. Such validation tools are integrated in some IDEs.


Previous Page Page 10 of 36 Next Page


A button for going back to the top of this page