Comment syntax table:
Comment type | Syntax or possible value |
---|---|
standard HTML comment | <!-- Comment content --> |
downlevel-hidden | <!--[if expression]> HTML <![endif]--> |
downlevel-revealed | <![if expression]> HTML <![endif]> |
Supported features table:
Item | Example | Comment |
---|---|---|
IE | [if IE] | The string "IE" is a feature corresponding to the version of Internet Explorer used to view the Web page. |
value | [if IE 7] | An integer or floating point numeral corresponding to the version of the browser. Returns a Boolean value of true if the version number matches the browser version. |
WindowsEdition | [if WindowsEdition] | Internet Explorer 8 on Windows 7. The string "WindowsEdition" is a feature corresponding to the edition of Windows used to view the Web page. |
value | [if WindowsEdition 1] | An integer corresponding to the edition of Windows used to view the Web page. Returns a Boolean value of true if the value matches the edition being used. |
true | [if true] | Always evaluates to true. |
false | [if false] | Always evaluates to false. |
Operators table:
Item | Example | Comment |
---|---|---|
! | [if !IE] | The NOT operator. This is placed immediately in front of the feature, operator, or subexpression to reverse the Boolean meaning of the expression. |
lt | [if lt IE 5.5] | The less-than operator. Returns true if the first argument is less than the second argument. |
lte | [if lte IE 6] | The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument. |
gt | [if gt IE 5] | The greater-than operator. Returns true if the first argument is greater than the second argument. |
gte | [if gte IE 7] | The greater-than or equal operator. Returns true if the first argument is greater than or equal to the second argument. |
( ) | [if !(IE 7)] | Subexpression operators. Used in conjunction with boolean operators to create more complex expressions. |
& | [if (gt IE 5)&(lt IE 7)] | The AND operator. Returns true if all subexpressions evaluate to true |
| | [if (IE 6)|(IE 7)] | The OR operator. Returns true if any of the subexpressions evaluates to true. |
Here is an example;
<!--[if IE 9]> <p>Welcome to Internet Explorer 9.</p> <![endif]-->
For more information, See: http://msdn.microsoft.com/en-us/library/ms537512.aspx
HTML codes that is a nice blog checkout my blog at
ReplyDeletehttp://definingwords.blogspot.com/2012/08/romantic-words.html
feel free to leave a comment