headerIMG

B2B Articles - Sep 21, 2009 1:55:41 PM

Conditional Comments HTML - Internet Explorer Issues In Web Design

Conditional comments work in Internet Explorer and on Windows only.  For this reason, you can create special instructions to be executed by Internet Explorer only ( on Windows ). Conditional comments are for Internet Explorer 5 and higher.

The basic structure of a conditional comment is the same as an HTML comment (<!-- -->). When another browser sees such comments, they will simply ignore them.

This code snippet will target Internet Explorer 6:

<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->

This code snippet will target Internet Explorer:

<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->

This will target the browser: Internet Explorer and all versions above 5:

<!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->

Tel 212-993-7809  

Ironpaper ®
10 East 33rd Street 
6th Floor
New York, NY 10016
Map

Ironpaper - B2B Agency

B2B Marketing and Growth Agency.

Grow your B2B business boldly. Ironpaper is a B2B marketing agency. We build growth engines for marketing and sales success. We power demand generation campaigns, ABM programs, create B2B content, strengthen sales enablement, generate qualified leads, and improve B2B marketing efforts.

Ironpaper Twitter Ironpaper Linkedin