0
votes

Whenever I write a VF Page, I see the "loose.dtd" file being included automatically in the HTML code(Firebug/Developer Console).

DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"

Please suggest an approach to remove this, as it makes my HTML code to conflict with IE.

1
Is this only on pages that don't have a DOCTYPE to begin with, or also on pages that have a different DOCTYPE? - Mr Lister

1 Answers

1
votes

This is documented in salesforces documentation. The default doctype is loose, if you want a stricter or different doctype you need to specify it using the docType attribute.

Eg

<apex:page controller="Pagecontroller" docType="html-5.0">

More info here: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm