<em> 與 <strong>的差異、著重號真的該是 <em> 嗎?

有些 Web Developer 提到說我們要用語意標籤,可是我覺得我還是分不清楚 <em>
跟 <strong> 在語意上到底有什麼差別,希望獲得指點一下。

現在的HTML規範是這樣定義的:

<strong>
[[
The strong element represents strong importance for its contents.

Changing the importance of a piece of text with the strong element does
not change the meaning of the sentence.
]][1]
(strong 元素代表它的內容的重要性。用 strong 元素改變一段文字不會改變該
句子的意思。)

<em>
[[
The em element represents stress emphasis of its contents.

The placement of emphasis changes the meaning of the sentence. The
element thus forms an integral part of the content. The precise way in
which emphasis is used in this way depends on the language.
]]
(em 元素代表它的內容的強調性。「強調」的位置會影響該句子的意義,也因此
元素是內容不可分割的一部份。使用「強調」的明確方式跟該語言有關。)

我想 <em> 用在英文中句子的一小部份的情形是可以理解的,比如說用在 Be 動詞
上(「is」、「are」)是可以理解的,通常代表這些字要唸長一點。

當 <em> 用在完整的一句話的時候,我覺得就開始跟 <strong> 的界限很模糊了。
規範給的例子是:

[[
By emphasizing the entire sentence, it becomes clear that the speaker is
fighting hard to get the point across. This kind of emphasis also
typically affects the punctuation, hence the exclamation mark here.

<em>Cats are cute animals!</em>
]]
(強調了整個句子之後,此對話主角強烈地想要傳達該訊息的心情就很明確了。這
種強調也影響標點符號,所以有一個驚歎號在這。

<em>貓是可愛的動物!</em>)


我實在分不太清楚 <strong> 跟 <em> 使用在整個句子的時候有什麼差別... 你可
以發現 emphasis 的兩個翻譯「強調」的「強」與「著重」的「重」跟 <strong>
用法的定義(重要性)真的是非常的重複。

在探討這個(無聊的)問題之中,也發現到老掉牙的 XHTML2 似乎有討論[3]過
<strong> 這個元素的存廢問題而覺得很好玩,畢竟在 HTML4 裡面 <strong> 就是
只是定義成比較強的 <em> 而已。

總之我現在的判斷 <em> 跟 <strong> 的方法如下:

1. 如果被標注的是一個單詞而不是完整的句子,用 <em>

2. 如果被標注的句子是緊告或是錯誤訊息使用 <strong> (相關部落文[4])

3. 其他的整句的情況我就真的不知道了,可能會照既有的 CSS 樣式使用吧 orz
也就是要著重號就用 <em> 要粗體就用 <strong> 雖然好像不是所謂的「語意用法」


大家覺得呢?

[1]
http://www.w3.org/TR/2011/WD-html5-20110113/text-level-semantics.html#the-strong-element
[2]
http://www.w3.org/TR/2011/WD-html5-20110113/text-level-semantics.html#the-em-element
[3] http://www.cs.tut.fi/~jkorpela/html/em.html
[4] http://green-beast.com/blog/?p=234

Received on Thursday, 24 March 2011 00:02:18 UTC