Saturday, May 15, 2010

Specifying Document Compatibility Modes

To specify a document mode for your Web pages, use the meta element to include an X-UA-Compatible http-equiv header in your Web page. The following example specifies Emulate IE7 mode compatibility.

<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<title>My Web Page</title>
</head>

<body>
<p>Content goes here.</p>
</body>
</html>

This example tells Internet Explorer 8 to display a Web page the same way that Internet Explorer 7 displayed it.

No comments:

Post a Comment