注釈を表現するためにu要素を使う
u要素は、もともとunderline要素と呼ばれ下線を引くために用いられてきたが、HTML4で非推奨となった。しかし、HTML5では「固有名詞に注釈をつける」「スペルミスを表現する」などの意味になって復活した。
The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt.
以下のように、スペルミスを表現するために使う。用途は限られており、使う場面は少ないかもしれない。
<p>This paragraph includes a <u>wrnogly</u> spelled word.</p>
使用上の注意
- より正しくマークアップするためには、
<em>、<b>、<mark>、<strong>、<cite>、<i>を用いるべき - 使う場合は、同じくunderlineが表示される
<a>と誤認されないようにする
デモ
This paragraph includes a wrnogly spelled word.