Pages

1/27/2009

SharePoint: DOCTYPE Notes

SharePoint Designer Notes:

New pages get a DOCTYPE from:

  Tools -> Page Editor Options -> Authoring -> Document Type Declaration

Existing pages with no (or invalid) DOCTYPE get:

  Tools -> Page Editor Options -> Authoring -> Secondary Schema

The schema used for IntelliSense validation is set here:

  Tools -> Page Editor Options -> Authoring -> CSS Schema

 

General SharePoint DOCTYPE Notes:

SharePoint WSS out-of-the-box templates do not specify a DOCTYPE while publishing templates use HTML 4.01 Transitional (and be aware these often have inconsistent and sometimes mal-formed HTML - try validating a SharePoint page here sometime: http://validator.w3.org)

It may be best to create SharePoint pages with no DOCTYPE specified. Each DOCTYPE seems to cause a problem somewhere. See here and read the comments: http://www.heathersolomon.com/blog/archive/2007/02/21/6213.aspx

 

Possible DOCTYPEs:

See: http://www.w3schools.com/tags/tag_DOCTYPE.asp

<!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">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

 

Related:

IF you are using a DOCTYPE, then force IE8 to render pages in IE7 format:

<meta http-equiv="X-UA-Compatible" content="IE=7" />

Resources:

http://www.heathersolomon.com/blog/archive/2008/01/25/DOCTYPES-and-SharePoint.aspx

http://www.w3schools.com/tags/tag_DOCTYPE.asp

plus any web search on DOCTYPE

No comments:

Post a Comment

Note to spammers...
Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.