View Full Version : <red>

06-20-2010, 03:17 AM
A few times I've changed font colors and added bold properties in css by doing:

red { color: red; font-weight: bold; }

Then simply referencing it in the html by typing

<red>This text is now red and bold</red>

Now, it seems to work with everything but IE6. Is this just total slop of me to do or is this a normal practice? Any ways to get IE6 to work with something short and sweet like this or do I have to full on create a class for it since I reference it a few times on one page and don't want to use an H tag for it?

Or is:

.red { color: red; font-weight: bold; }

<div class="red">This text is now red and bold</div>

06-20-2010, 06:22 AM
well, to be clear the <red> way doesn't work in IE6, IE7, IE8, or Safari 3.0

06-20-2010, 07:17 AM
Use a class.

06-20-2010, 06:24 PM
will do. I'm always trying to be lazy and take shortcuts and it ends up being a headache for no reason. Just thought I seen other people doing it in their code but I must be mis-understanding whatever they are doing.

Thanks for the quick reply:)