Re: PHP, Smarty, and Text
| From: | Benjamin Hawkes-Lewis | Date: | Thu, 15 Jan 2009 01:49:42 +0000 |
| Subject: | Re: PHP, Smarty, and Text | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-286398@lists.php.net to get a copy of this message | ||
On 14/1/09 07:56, Robert Cummings wrote:
Strip all tags except bold and italics. Then replace<b> with<strong> and<i> with<em> since the former tags are deprecated.Actually, "b" and "i" have not been formally deprecated in any standard. The closest thing to a prohibition on these elements is WCAG 1.0's Checkpoint 3.3 "Use style sheets to control layout and presentation."
If semantic meaning is not intended by<b> and<i> then replace with<span class="bold"> and<span class="italic"> and create those CSS styles."em" is for stress. "strong" is for strong stress. In the third case, where semantic meaning _is_ intended by bold or italic but that meaning is _not_ stress, it's best to use relevant specific elements ("code", "var", "cite", "q", "kbd", "samp", etc.?) or failing that class names that express meaning not just style ( http://www.w3.org/QA/Tips/goodclassnames ). -- Benjamin Hawkes-Lewis