IE conditional comments for XHTML

IE conditional comments for XHTML
<br />Conditional comments are a feature unique to IE that can perform separate XHTML code processing on IE series products. Note that it is mainly for XHTML, not CSS.
Conditional comments are very powerful and can be used to make true and false judgments, for example:
Program Code
<!--[if IE]>This content is only visible to IE<![endif]-->
<!--[if IE 6.0]>This content is only visible to IE6.0<![endif]-->
Conditional comments can be used by IE to determine the version of the browser and display the content if the conditions are met. IE5.0 to 7.0 all support the comment function, and the version number is accurate to 4 decimal places:
Program Code
<!--[if IE 6.1000]>This content is only visible in IE6.1<![endif]-->
IE conditional comments also support the exclamation mark non-operation:
Program Code
<!--[if !IE 6.0]>This content is visible except for IE6.0 version<![endif]-->
And it supports prefixes to determine higher or lower versions:
Program Code
<!--[if gt IE 5.0]>This content is only visible in IE5.0 and above<![endif]-->
The gt here stands for greater than, which means versions above the current condition version, but not including the current version.
There are several other prefixes:
lt means less than the version below the current condition version, excluding the current version.
gte means greeter than or equal to the current version and including the current version.
lte means less than or equal to the current version and includes the current version.

<<:  How to modify the contents of an existing Docker container

>>:  Detailed explanation of MySQL sql_mode query and setting

Recommend

Docker data storage tmpfs mounts detailed explanation

Before reading this article, I hope you have a ba...

Share 20 excellent web form design cases

Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...

Detailed graphic explanation of how to use svg in vue3+vite project

Today, in the practice of vue3+vite project, when...

Solution to the problem that the Vue page image does not display

When making a new version of the configuration in...

How to make a centos base image

Preface Now the operating system used by my compa...

Summary of javascript date tools

let Utils = { /** * Is it the year of death? * @r...

MySQL stored procedure method example of returning multiple values

This article uses an example to describe how to r...

HTML+CSS to achieve responsive card hover effect

Table of contents accomplish: Summarize: Not much...

Web page production TD can also overflow hidden display

Perhaps when I name this article like this, someon...

Let's talk briefly about the changes in setup in vue3.0 sfc

Table of contents Preface Standard sfc writing me...

Ubuntu 16.04 64-bit compatible with 32-bit programs in three steps

Step 1: Confirm the architecture of your system d...

A brief discussion on read-only and disabled attributes in forms

Read-only and disabled attributes in forms 1. Rea...

A brief discussion on Nginx10m+ high concurrency kernel optimization

What is high concurrency? The default Linux kerne...

SQL ROW_NUMBER() and OVER() method case study

Syntax format: row_number() over(partition by gro...

Nginx uses Lua+Redis to dynamically block IP

1. Background In our daily website maintenance, w...