Forum Moderators: open
And which bold? Isn't <b> deprecated in favor of <strong>?
Yes, Brett's tips still stand, but don't forget the ever important getting relevant links. Keep in mind that in my experience, when using his tips, it works so much better if your page has about 100 words or more. Anything less than that, seems to make all that optimizing overkill. This is just my experience though.
I have actually been wondering the same thing with the "bold" issue. I've seen both methods used and wonder if it makes a difference. I hope it's <b> because that's what I use. :)
Karen
If you're in a hurry b and i are faster to type. I think you would have to have a rediculous amount of bolding tags for the extra characters to effect bandwidth in a meaningful way. One 40K image has gotta be work about 10,000 strong tags or something rediculous.
Muskie
I am no longer use either as I'm much more inclined to utilize CSS which offers 'font-weight'.
The <b> and <i> tags are for visual markup, meaning that they are purely for visual presentation (what you see with your eyes).
The <strong> and <em> tags are used for emphasis, and are also referred to as phrase elements. The browser renders <strong> the same as <b> and <em> the same as <i>, as mentioned above.
From an accessibility standpoint, <b> and <i> tags are not suggested as aural browsers (browsers that read content aloud) will tonally emphasize words that have these tags. Not so with the <b> and <i> tags.
My question is this, if these tags (either/or) have value in an aural and indexing sort of way, what happens when you move those tags to external css and use the <span> element. How can the browsers (aural included) dechipher what the <span> tag represents? Is there a list of common <span> tags that are used to replace <b>, <strong>, <i>, and <em>?
I'm familiar with the <span> tag and use it all the time in its basic format. For example...
<span class="greend">Content here</span>
Then in my external style sheet...
span.greend{font-weight:bold;color:#690;background:transparent;}
This gives me a bold dark green font. This is referred to as an inline style which is what the <span> tag is for.
So, should we remove those tags and now use style sheets for presentation? Or, are there certain elements that need to remain on the page while the SE's catch up to the latest in html/xhtml/css?
what happens when you move those tags to external css and use the <span> element
Why would you want to use the span element which is just a generic mechanism for adding structure to documents when you could use the much more meaningful strong or em elements? Surely not just to style them. This could be done simply by styling those elements in your external style sheets.
Andreas
<span class="greend">Content here</span>
...
span.greend{font-weight:bold;color:#690;background:transparent;}
...should be:
<strong class="greend">Content here</strong>
...
strong.greend{color:#690;}
<span> is just for cases where there is no logical tag to attach the class to (as Andreas already implied).