Drupal - Is Drupal following W3C standards? How to change the DOCTYPE?

This would completely depend on the theme you are using on the Drupal site, as the markup of the site is handled on the theme layer.
If you are using an HTML5 theme, then the it will show the appropriate DOCTYPE i.e. <!DOCTYPE html>. In short, your theme should support HTML5 in order to get the DOCTYPE.

To answer your question, you'll need to either make your theme compatible to HTML5, or use any other HTML5 theme.
There is a very good article for Converting Your Drupal 7 Theme Into HTML5 which could give you a good start.


The HTML+RDFa 1.1 Doctype (which will be valid for HTML4 & 5) is still under development:

As such The W3 validator doesn't recognise it, even though your document might well validate against the standard itself.

So to answer your question, yes, Drupal (or what's more likely, the theme that you're using) is conforming to W3C standards, it's just that the spec hasn't been ratified yet.

You might see advice out there telling you not to use that DOCTYPE, that <!DOCTYPE html> should be used instead. That advice is incorrect, per the specification

Tags:

Theming