The browser's condition annotation theory is explained in the following example.
(X) HTML
The following code is used to test the effect of the condition comment statement in Microsoft's IE browser.
<! -- [If IE]>
<H1> you are using IE <! [Endif] -->
<! -- [If IE 5]>
<H1> version 5 <! [Endif] -->
<! -- [If IE 5.0]>
<H1> Version 5.0 <! [Endif] -->
<! -- [If IE 5.5]>
<H1> version 5.5 <! [Endif] -->
<! -- [If IE 6]>
<H1> version 6 <! [Endif] -->
<! -- [If IE 7]>
<H1> Version 7 <! [Endif] -->
The following code is a condition comment for running in a non-IE browser
<! -- [If! IE]> <! -->
<H1> you are not using Internet Explorer <! -- <! [Endif] -->
It eventually works in non-IE and special IE browsers
(Or use lte lt or gt gte to determine, for example:
<! -- [If lte IE 6]>
Information displayed in IE 6
<! [Endif] -->
).
<! -- [If IE 6]> <! -->
<H1> you are using Internet Explorer version 6 <br/>
Or a non-IE browser <! -- <! [Endif] -->
From: http://www.cssplay.co.uk/menu/conditional.html
Preview model
The condition annotation mentioned above is to determine the browser type and then define what content is displayed under the browser.
This dropmenu (drop-down menu) model comes from cssplay, which is made after many researches and repeated tests by the author. I want to use this model to illustrate the principle of conditional annotation.