XHTML:Conditional Comments

From virtualMV2015wiki
Jump to: navigation, search


Conditional comments only work in Explorer on Windows (need to check this), and are thus excellently suited to give special instructions meant only for Explorer on Windows. They are supported from Explorer 5 onwards, and it is even possible to distinguish between 5.0, 5.5 and 6.0.[1]

Icon Objective.png

Objective Conditional comments

By the end of this page you will be able to:

  • Describe the purpose and use of Conditional comments


Need to check following code (may need to comment out <-- )

<![if ! Chrome ]>
<link rel="stylesheet" href="CSS_chrome.css" />
<![if ! firefox ]>
<link rel="stylesheet" href="CSS_firefox.css" />
<![if ! IE ]>
<link rel="stylesheet" href="CSS_ie.css" />

Icon References.png References

  1. Conditional comments. Retrieved November 4, 2010 from http://www.quirksmode.org/css/condcom.html

XHTML:Conditional Comments. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 12, 2017, from http://www.virtualmv.com/wiki/index.php?title=XHTML%3AConditional_Comments    (zotero)