View Full Version : unknown codes


jessimo093
05-29-2006, 03:51 AM
So I was wondering what these codes will do and what they mean. I've seen them around and am just wondering:

<strong>
and
<em>

Thanks in advance!

amyaurora
05-29-2006, 05:06 AM
<strong> is <b>
and
<em> is <i>

BlueFlame
05-29-2006, 10:49 AM
Iv noticed myself that to and I program my websites using <strong> and <em>
It really depends whats you like. I rather those to because it dosnt confuse me when Im reading the code. I have never seen any problems with these and they have seemed pretty safe in all internet explorers.

djou
05-30-2006, 11:27 PM
As a validation obsessee, I would say that <b> is meant to make text bold, whereas <strong> is meant to put a strong emphasize on text, just like <i> makes text italics and <em> puts an emphasize on it. The result is visually the same but I believe voice browsers interpret them differently. I'm not sure though.

Raphael
05-31-2006, 08:15 PM
An HTML Purist will tell you this:

<strong> is a logical tag.
<b> is a presentational tag that only applies to graphical web browsing displays.

<strong> tells the browser that this piece of text is important. Usually, that means make the text bolder, but what if you're using a font that doesn't have a bold style associated with it? What if the person viewing your page has their browser override your font choices with their own and their font doesn't have a bold style? What if the person viewing the page is using a text-only browser, or better yet, a screen reader? How do you read in "bold" ??

With the <strong> tag, you allow the client viewing application the choice of how to emphasize that piece of text.

With the <b> tag, you're not. You're saying 'Make this text bold. Do not pass go, do not collect $200. Just make it bold' You aren't telling the browser why you want it bold. Is it because the text is important? Is it so that it'll fit nicer into the space you have assigned it on your page?

So if the client viewing application has no way to display bold text, it'll just display normal text - or worse, nothing at all.

Logical tag always give the browsers options. Presentational tags do not. Use them at you own risk ;)