SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. 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

I'm very new to sharepoint development and I would like to know, if it is possible to change the doctype in SharePoint just for one page (or better for a webpart, I think just for a webpart or is it not possible)? If I change the default.master doctype, will the complete doctype for SharePoint change?

What is the best way to provide a webpart the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"""> doctype?

share|improve this question
up vote 1 down vote accepted

I don't think there is a way to change the Doctype (as it's read only) for a single page or Webpart. Either you have to fix the CSS ( I would strongly suggest) OR change the Doctype for the master page which would effect the whole site collection.

share|improve this answer

If you change the doctype on a masterpage, it only affects pages that inherit that masterpage within that site collection unless you take steps to deploy it everywhere within the farm.

share|improve this answer

My understanding of the dtd is that the only practical effect of most of these doctype declarations (excl. XHTML strict) is to enable older versions of IE to switch from quirks mode to standards compliant mode. does this just fine, as does pretty much every doctype, and you can also use the x-ua-compatible meta-equiv instead, which works in IE7+ (SP2010 doesn't support IE6).

I would be interested to know: Do you have some practical requirement for that specific doctype? What is the purpose of changing it?

share|improve this answer
I had some css stuff, which just works fine with loose... Now i changed it and the site works pretty well. Thanks everybody. – hofmeister Oct 11 '11 at 5:41

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.