Certified HTML Designer Learning Resources XHTML First Line

Learning Resources

XHTML First Line

It is a good idea to begin all XHTML, or indeed any XML application, with an XML declaration. XML declarations explicitly state which version of XML and which character encoding we are going to use. For example, if we wanted to use XML 1.0 with Western European character encoding, our XML declaration might look something like this:

Note that if no XML declaration is stated, the document is assumed to be XML 1.0 with UTF-8 character encoding.

Your XHTML isn't valid unless it has a doctype. Doctypes are actually SGML statements which tell the browser what version of XHTML you are using

 For Support