Forum Moderators: open
The difference you are seeing is due to the doctype, not the
xmlns attribute. When using a complete doctype such as one for XHTML, the page is rendered using a standards-compliance mode where the W3C standards are more closely followed than for legacy HTML. See the following thread for more information: For the
xmlns attribute you mention, it has no meaning when you serve your XHTML with a HTML MIME type - which is almost always the case. In pure XML, the attribute defines the namespace for the XHTML markup. To conform to XHTML standards you should keep it despite its redundancy, or alternatively you can use HTML 4 and avoid the need for it altogether.