I know that you can use an IE conditional comment inside HTML:
IE stylesheet hacks
.Class { color: green; /* standard */ color: green\9; /* IE 8 and below */ *color: green; /* IE 7 and below */ color: green !ie; /* IE 7 and below */ _color: green; /* IE 6 */ }