Why shouldn't I use <b>, <i>, <u> in html code?

Willy

New member
I was told that I shouldn't use <b>, <u> or <i> in html anymore. Instead I should use <span> tag with some CSS in it. Why should I do this instead of doing a simple <b> tag. It just creates more work. Is there a reason, or this person just is a perfectionist or something?
 
In short, by using those tags, you're improperly using HTML.

Long answer:

HTML was initially designed to provide applications, (such as web browsers), with information about WHAT the content of the page was. For instance, the <p> tag in HTML tells the browser that the content between the tags is a paragraph.

CSS is used to tell the browser what the content should look like. It may seem like more work to use <span style='font-weight:bold;'>Thing</span>, but to be honest, there's easier ways to use CSS. Take a look around and find yourself a good tutorial on CSS based web design, and I think you'll be pleasantly surprised at how much easier it makes your life in the long run.
 
Back
Top