Load CSS by version of IE using a conditional comment hack

Explanation

Internet Explorer 5 and later for Windows allow you to hack using a conditional comment. Load CSS by version of IE using a conditional comment hack. Though the <link> tag is used in samples, you can also define the style using the <style> tag.

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
<link rel="stylesheet" type="text/css" href="all.css">
<!--[if gte IE 5.0]>
<link rel="stylesheet" type="text/css" href="ie5.css">
<![endif]-->
<!--[if gte IE 5.5000]>
<link rel="stylesheet" type="text/css" href="ie55.css">
<![endif]-->
<!--[if gte IE 6.0]>
<link rel="stylesheet" type="text/css" href="ie6.css">
<![endif]-->
</head>
<body>
<h1>Sample</h1>
<p>
Load CSS individually using a conditional comment hack that can be used in Win+IE5 and above.<br>
</p>
</body>
</html>