HTML 的標(biāo)簽負(fù)責(zé)將內(nèi)容標(biāo)記為 HTML 元素,瀏覽器的默認(rèn) CSS 樣式表負(fù)責(zé)按照 W3C 的建議來(lái)指定 HTML 元素的默認(rèn)樣式。
在那個(gè)用 HTML 指定字體、字號(hào)、顏色……的時(shí)代,HTML 標(biāo)簽 <b> 的意思是「bold」(粗體),它是一個(gè)單純的樣式標(biāo)簽,指定文本要用粗體。<strong> 是一個(gè)帶有著重意味的標(biāo)簽,瀏覽器通常也把它顯示為粗體。 后來(lái) CSS 興起,CSS 語(yǔ)句 font-weight: bold 成為首選的設(shè)置粗體的手法。<b> 這種樣式標(biāo)簽通常被唾棄,而 <strong> 這樣的語(yǔ)義標(biāo)簽受推崇。 后來(lái) HTML5 興起,重新界定了 <b> <i> <strong> <em> 這幾個(gè)相似標(biāo)簽的意義。直接從?HTML5 規(guī)范原文來(lái)看,其實(shí)很清楚: <em>:「stress emphasis of its contents」——強(qiáng)調(diào)內(nèi)容。<strong>:「strong importance for its contents」——著重內(nèi)容。Emphasis 和 importance 的區(qū)別對(duì)于漢語(yǔ)使用者來(lái)說(shuō)可能也比較難把握。但如果你熟悉英語(yǔ)的寫(xiě)作格式,你會(huì)明白格式化為斜體的各種強(qiáng)調(diào)文本與格式化為粗體的著重文本的區(qū)別。英語(yǔ)等西文的正文中,粗體其實(shí)是很少出現(xiàn)的。 <i>:「a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts」——無(wú)強(qiáng)調(diào)或著重意味的斜體(italic),比如生物學(xué)名、術(shù)語(yǔ)、外來(lái)語(yǔ)(比如「de facto」這樣的英語(yǔ)里常用的拉丁語(yǔ)短語(yǔ))……<b>:「a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede」——無(wú)強(qiáng)調(diào)或著重意味的粗體(bold),比如文章摘要中的關(guān)鍵詞、評(píng)測(cè)文章中的產(chǎn)品名稱(chēng)、文章的導(dǎo)言……
2014-11-20
hao
2014-11-20
HTML 的標(biāo)簽負(fù)責(zé)將內(nèi)容標(biāo)記為 HTML 元素,瀏覽器的默認(rèn) CSS 樣式表負(fù)責(zé)按照 W3C 的建議來(lái)指定 HTML 元素的默認(rèn)樣式。
在那個(gè)用 HTML 指定字體、字號(hào)、顏色……的時(shí)代,HTML 標(biāo)簽 <b> 的意思是「bold」(粗體),它是一個(gè)單純的樣式標(biāo)簽,指定文本要用粗體。<strong> 是一個(gè)帶有著重意味的標(biāo)簽,瀏覽器通常也把它顯示為粗體。
后來(lái) CSS 興起,CSS 語(yǔ)句 font-weight: bold 成為首選的設(shè)置粗體的手法。<b> 這種樣式標(biāo)簽通常被唾棄,而 <strong> 這樣的語(yǔ)義標(biāo)簽受推崇。
后來(lái) HTML5 興起,重新界定了 <b> <i> <strong> <em> 這幾個(gè)相似標(biāo)簽的意義。直接從?HTML5 規(guī)范原文來(lái)看,其實(shí)很清楚:
<em>:「stress emphasis of its contents」——強(qiáng)調(diào)內(nèi)容。<strong>:「strong importance for its contents」——著重內(nèi)容。Emphasis 和 importance 的區(qū)別對(duì)于漢語(yǔ)使用者來(lái)說(shuō)可能也比較難把握。但如果你熟悉英語(yǔ)的寫(xiě)作格式,你會(huì)明白格式化為斜體的各種強(qiáng)調(diào)文本與格式化為粗體的著重文本的區(qū)別。英語(yǔ)等西文的正文中,粗體其實(shí)是很少出現(xiàn)的。
<i>:「a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts」——無(wú)強(qiáng)調(diào)或著重意味的斜體(italic),比如生物學(xué)名、術(shù)語(yǔ)、外來(lái)語(yǔ)(比如「de facto」這樣的英語(yǔ)里常用的拉丁語(yǔ)短語(yǔ))……<b>:「a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede」——無(wú)強(qiáng)調(diào)或著重意味的粗體(bold),比如文章摘要中的關(guān)鍵詞、評(píng)測(cè)文章中的產(chǎn)品名稱(chēng)、文章的導(dǎo)言……