Re: Formatting an ECHO statement.

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

 



On Mon, Oct 18, 2010 at 1:28 PM, tedd <tedd.sperling@xxxxxxxxx> wrote:
> 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.
>

That is the exactly the intended purpose of the <em></em> and
<strong></strong> tags: they simply indicate semantically that the
enclosed text is either emphasized or strong (or, if nested, the text
would be strongly emphasized? ;-) ), and it is up to CSS to define
what that should look like. The appearance can easily change at any
time without changing the HTML itself, just as you suggest.

While the same is technically true of <i>italic</i> and <b>bold</b>,
those tags by definition imply a specific way to render the content
that they contain, which makes a real confusion in cases such as <i
style="font-style: normal; font-weight: bold;">text</i>.

Andrew

-- 
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