Re: Underline element.

On Dec 27, 2007, at 6:42 PM, Andrew Fedoniouk wrote:

>
> Ivan Enderlin wrote:
>> Hi all :)
>> I was reading the HTML 5 draft and something is strange about <u>  
>> tag.
>> In HTML 4, <u> tag is depreciated [1], and <u> tag doesn't exist in  
>> HTML 5 [2]. I don't find anymore informations about it in XHTML 1.0  
>> or 1.1. So I deduce that we can't underlined an element in HTML  
>> right now ?
>> Best regards,
>> -Ivan
>> Notes :
>>    [1] http://www.w3.org/TR/html4/present/graphics.html#edef-U ;
>>    [2] http://www.whatwg.org/specs/web-apps/current-work/#phrase.
>
> There is one case that we use in UI for <u> - to mark shortcut  
> combinations:
>
> <button><u>O</u>pen</button>
>
> We do have special behavior defined for the <u> element that
> synthesizes button click event when user presses Ctrl-O
> (for the button above).
>
> So this brings some semantic meaning to the element
> but this is not what it was intended for of course.

Doing this results in platform-dependent UI. While on Windows using an  
underlined character to indicate a keyboard shortcut is common, on Mac  
OS X it is highly nonstandard UI. And platforms without a full  
keyboard (such as mobile phones with only a numeric keypad, or  
touchscreen devices like iPod touch that have only a virtual keyboard)  
would not make use of keyboard shortcuts at all. So I don't think this  
is a very good example.

Regards,
Maciej

Received on Saturday, 29 December 2007 14:23:16 UTC