At 6:03 PM +0100 10/18/10, a...@ashleysheridan.co.uk wrote:
There's nothing wrong with using <em> as it indicates emphasised
text, which is semantic. Use span tags with classes only when the
content you're styling has no semantic alternative.
<strong>important message</strong> is much better for machines
(including search engines, screen readers, etc) to infer a meaning
<span class="bold_text">important message</span>
While using the em tag as you describe will certainly work, but what
happens when the designer wants to change the style of an em tag to
something else and doesn't want the output from your code to change?
I have found it better to leave styling to the designer.
One can compromise by using a class such as "class=warning" or
"class=output" and then addressing the style of the output in a style
sheet. Such as:
Now, you do have a point regarding SE, where some SE's look to the em
and strong tags to determine word weight in ranking, but therein also
lies a problem. What if the client doesn't want the output from code
to be considered in SE's? After all, if output is static, then why
code it? If it is variable, then that will cause your ranking to
change. Sounds like disaster to me.
My choice to is to leave the styling, SE, screen readers, and other
such concerns to those who know more than I do. Just give me a style
class and let me work on the code.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php