UPDATED: Base Master Page – DOCTYPE

I have updated my Base Master Pages again, this time changing or adding the DOCTYPE tag in each.  Please note that the base master pages include the HTML Transitional DTD that will display your site in quirks mode.  Please replace the DTD if you need a more refined presentation mode for your site.

I selected this DTD because it can assist the broadest audience (older browsers, mobile views, newer browsers, etc).  If you want to use a standards compliant presentation mode, you can switch the DOCTYPE to:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>


<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

For more info about DOCTYPEs, check out the info at W3Schools.

2 thoughts on “UPDATED: Base Master Page – DOCTYPE”

  1. When I add a DOCTYPE tag of 4.01 to a default SharePoint publishing site masterpage, the pages quit expanding to 100% of the viewport. I then specify that the HTML, BODY, and FORM have a height of 100%. This fixes the site for Firefox and Safari, but for IE it makes the page expand beyond 100% of the viewport. This seems to be because the TR in the main table that has a height of 100% is expanded to 100% of the page height and not just 100% of the remaining space in the table.I could really use a fix for this other than removing the DOCTYPE or using an older one, because having a DOCTYPE of 4.01 allows IE7 to use great CSS methods like attribute selectors.Thanks

  2. We have a design using XHTML Strict doctype and all is well except we have noticed that Lookup Fields in the form of drop down menus… do not work and produce a JavaScript error. Removing the doctype from the master solves the issue but then much of our CSS breaks.For example: We have a central list called Teams which contain team names. A column (Team) has been added to the Publishing Page Content Type as a Lookup of the original Teams list which allows us to set the Team value for any page. Within the Page Layout an Edit Control Panel and the Team field is added to the page. All is fine until the user edits the page and clicks the Teams dropdown menu. JavaScript error: object not found. Turn off doctype and all is good again. If anyone knows of a solution or why this is an issue please post.Thanks.

Comments are closed.