• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 604
  • Last Modified:

<!DOCTYPE html>

Some of my users while viewing in IE9 are having the document mode set to IE7 with browser mode set to IE9 compatibility view. This is causing a few columns to render incorrectly. Issue is with IE7 not following colspan the way it should.

Anyways, I plan on setting the <!DOCTYPE html> and of course now IE 9 renders in standard mode and all is well.

my question is that is there any downside to this?
0
sanagarwl
Asked:
sanagarwl
  • 3
  • 2
  • 2
2 Solutions
 
Brian PringleSystems Analyst II, SCM, ERPCommented:
You should always clarify which HTML standard you are using.  It is good form and helps to ensure that your document will get rendered correctly.  

The downside is that not all browsers render different versions of HTML correctly.  Your site may still look different on different browsers and/or different platforms.
0
 
Brian PringleSystems Analyst II, SCM, ERPCommented:
Please read the following article regarding the doctype declaration.

http://www.w3schools.com/tags/tag_doctype.asp
0
 
Dave BaldwinFixer of ProblemsCommented:
Here http://www.w3.org/QA/2002/04/valid-dtd-list.html is the list of official DOCTYPEs.  Note that <!DOCTYPE html> isn't actually a standard yet though most browsers support it to some degree.  

A DOCTYPE tells a browser how to render HTML elements.  HTML5 does not support the exact same things that previous versions do.  For that matter, XHTML is not exactly the same as HTML4.  It is best if you use the DOCTYPE that your code conforms to.  Being a generally lazy person, I usually use HTML 4 Transitional because it is the most forgiving of the DOCTYPEs in most browsers.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
sanagarwlAuthor Commented:
Thanks

So how do I get IE9 to render in document mode IE9 rather then flipping back to ie7

With DOcTYPE HTML it works fine on IE9 it prevents it from going back to ie7 document mode
0
 
Dave BaldwinFixer of ProblemsCommented:
The best thing to do is use the W3C Validator at http://validator.w3.org/ to make sure your page is conforming to the DOCTYPE that you have chosen.
0
 
sanagarwlAuthor Commented:
Thanks

The site is under development and is within the corporate network - any other way I can validate ?
0
 
Dave BaldwinFixer of ProblemsCommented:
There are three options on that page.  One is to copy and paste the "View Source" of the page into a window on one of the tabs.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now