4

Any idea why this is not generating an html5 doctype in my pages?

<apex:page applyBodyTag="false" applyHtmlTag="false" showHeader="false" 
  cache="false" contentType="text/html" sidebar="false" 
  standardStylesheets="false" docType="html-5.0">

API version is set to 36.0. When I open the console in IE11, I get this warning message:

HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "".

Also, when I view the page's source in Chrome, Firefox, and IE11, I do not see a <!doctyle html> tag included in the markup.

3

1 Answer 1

4

Adding a "custom" contentType appears to suppress the DOCTYPE. Do not add this attribute if you need the DOCTYPE.

<apex:page applyBodyTag="false" applyHtmlTag="false" 
           showHeader="false" cache="false" sidebar="false"
           standardStylesheets="false" docType="html-5.0">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .