Re: Formatting an ECHO statement.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 6:03 PM +0100 10/18/10, ash@xxxxxxxxxxxxxxxxxxxx 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 for than
<span class="bold_text">important message</span>

Thanks,
Ash
http://www.ashleysheridan.co.uk

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:

echo("span class='warning'>$output</span>");

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.

Cheers,

tedd

--
-------
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux