W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Re: Underline element.

From: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
Date: Fri, 28 Dec 2007 19:41:41 -0000
Message-ID: <005801c84989$adf1eec0$0201a8c0@ben9xr3up2lv7v>
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Simon Pieters" <simonp@opera.com>
Cc: "HTMLWG" <public-html@w3.org>

Lachlan Hunt wrote:
> But if some people want [<u>] included, we should focus on finding reasons 
> why it should be included, rather than why it currently hasn't been 
> included.

I had noticed a new round of messages expressing dissatisfaction with the 
WHATWG/HTMLWG process. I thought this small issue about <u> would be a neat 
opportunity to be transparent and show how past decisions had been taken?

I searched the [WHATWG list] but didn't find much. Karl's link to the 
[Wikipedia] entry for "Underline" has some interesting purposes, as does 
[Simon's] recent e-mail.

Simon Pieters wrote:
>   * To indicate which part of the text would be link text in a sample 
> (I've seen  this in fora when discussing link text, for instance).

Me (Cerbera) using underline in the way Simon describes:


Johan007 using <a href> point at the forum homepage for sample link text:


This technique means the page has lots of bogus hyperlinks. Underlined text 
would be preferable from a user's perspective.

The forum is using [phpBB]. Underlined text is marked up like this:

<span style="text-decoration: underline;">foo</span>

Which seems no better than this:


The <span style> version uses 49 bytes of markup. <font style> would be 
identical. The <u> version would use 7 bytes; 85% less each time.

An alternative is <span class>. The smallest possible example of that:

<span class="u">foo</span>

This uses 23 bytes of markup. <font class> would be identical. The <u> 
version would use 70% less markup each time.

Simon Pieters wrote:
>   * To underline text when e.g. converting a printed copy to HTML and
>     underlining is a specific typographical convention.

Legal text citations are an example of this. Authors are already recommended 
to use <u> for this, for example:


Example of a WYSIWYG user applying underline to a hyperlink (search for "The 
UCL Practitioner"):


Elsewhere, italic is applied to each side of the " v. " part using <em>:


Elsewhere, focus is given more to punctuation and abbreviation norms than to 
text styling:


<cite><u> could give these "citation-ness" with underline. For example:

cite u {
 font-style: normal;

<cite><u>foo vs. bar</u></cite>

(20 bytes of markup. 33 bytes of CSS.)

As opposed to:

cite.law {
 font-style: normal;
 text-decoration: underline;

<cite class="law">foo vs. bar</cite>

(25 bytes of markup. 65 bytes of CSS.)

<cite><u> is 20% less markup each time and 49% less CSS one time than <cite 

An example of hightlighting parts of speech using underline:


This is a common practice amongst school teachers on blackboards and in 
students' work books.

Simon Pieters wrote:
>   * To indicate hotkeys of menu items, e.g. in a "help" document.

An example of someone doing this in 1997 (search for "choose Cascade"):


A page where I did this in 2007 (search for "Save files"):


This was just a quick whizz around the web which turned up some interesting 
uses of <u>. I could do a "Collections of Interesting Phrase Markup" survey, 
including how people currently do search highlighting. :-)

Simon Pieters wrote:
>   * To mark or highlight something (i.e. same as <m>). (IIRC, Henri 
> Sivonen
>     proposed to use <u> instead of <m>.)

* Henri Sivonen has proposed [<u> for <m>].
* Simon Pieters has proposed [<b> for <m>].
* Google already does <b> on its result page.
* <b> is a more common way to mark text in web pages than underline.
* Default styling for <u> may look like a hyperlink to users.
* They are all equal in terms of filesize, unless class is needed for 
different styling.
  * <u> would avoid <b class> to style search keywords differently from 
generic bold text.
* <m> is a [proposed] new element which "will likely be rewritten or removed 
from the spec".

<b> is narrowly favourable to <u> as a replacement for the proposed <m>, 

[WHATWG list] <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/>
[Wikipedia] <http://en.wikipedia.org/wiki/Underline>
[<u> for <m>] 
[<b> for <m>] 
[proposed] <http://www.w3.org/html/wg/html5/#the-m>
[phpBB] <http://www.phpbb.com/>

Ben 'Cerbera' Millard
Collections of Interesting Data Tables
Received on Friday, 28 December 2007 19:42:25 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:29 UTC