Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default, SFDC pages (including Visualforce) are served with the DOCTYPE for HTML 4.01 Transitional (!!!) -- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

According the the VF documentation, we can serve VF pages as any doctype we want, including HTML5:

The HTML document type definition (DTD), or doctype, that describes the structure of the rendered page. If not specified, this value defaults to "html-4.01-transitional", which results in a doctype of . Possible values for this attribute include "html-4.01-strict", "xhtml-1.0-transitional", "xhtml-1.1-basic", and "html-5.0", among others. For more information about HTML doctype declarations, see the W3C specifications. -- Documentation for apex:page docType attribute

I'd love to develop my Visualforce in HTML5, but we're using a lot of standard Salesforce styling and formatting. Does the SFDC styling perform well under HTML5? Are there bugs, errors, or strange behaviors you've noticed?

share|improve this question
one of the links point to rendering issues :…!!! – Rao Nov 21 '12 at 22:29
I played around with this a little while ago and wrote up some things here: - not sure if it'll be of any use to you or even how accurate it is! – LaceySnr Nov 21 '12 at 23:27

I haven't noticed anything amiss when using the HTML5 doctype. The whole reason was chosen in the first place is because it was the simplest doctype that would be rendered by browsers in standards mode. This means that html4 markup will display fine under html5. This does not mean that all will be rosy trying to get visualforce to play nicely with html5, as one of the links in your comments illustrate.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.