Question

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"" http://www.w3.org/TR/html4/loose.dtd"> doctype?

Was it helpful?

Solution

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.

OTHER TIPS

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.

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top