HTML 的標簽負責將內容標記為 HTML 元素,瀏覽器的默認 CSS 樣式表負責按照 W3C 的建議來指定 HTML 元素的默認樣式。
在那個用 HTML 指定字體、字號、顏色……的時代,HTML 標簽 <b> 的意思是「bold」(粗體),它是一個單純的樣式標簽,指定文本要用粗體。<strong> 是一個帶有著重意味的標簽,瀏覽器通常也把它顯示為粗體。 后來 CSS 興起,CSS 語句 font-weight: bold 成為首選的設置粗體的手法。<b> 這種樣式標簽通常被唾棄,而 <strong> 這樣的語義標簽受推崇。 后來 HTML5 興起,重新界定了 <b> <i> <strong> <em> 這幾個相似標簽的意義。直接從?HTML5 規范原文來看,其實很清楚: <em>:「stress emphasis of its contents」——強調內容。<strong>:「strong importance for its contents」——著重內容。Emphasis 和 importance 的區別對于漢語使用者來說可能也比較難把握。但如果你熟悉英語的寫作格式,你會明白格式化為斜體的各種強調文本與格式化為粗體的著重文本的區別。英語等西文的正文中,粗體其實是很少出現的。 <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」——無強調或著重意味的斜體(italic),比如生物學名、術語、外來語(比如「de facto」這樣的英語里常用的拉丁語短語)……<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」——無強調或著重意味的粗體(bold),比如文章摘要中的關鍵詞、評測文章中的產品名稱、文章的導言……
2014-11-20
hao
2014-11-20
HTML 的標簽負責將內容標記為 HTML 元素,瀏覽器的默認 CSS 樣式表負責按照 W3C 的建議來指定 HTML 元素的默認樣式。
在那個用 HTML 指定字體、字號、顏色……的時代,HTML 標簽 <b> 的意思是「bold」(粗體),它是一個單純的樣式標簽,指定文本要用粗體。<strong> 是一個帶有著重意味的標簽,瀏覽器通常也把它顯示為粗體。
后來 CSS 興起,CSS 語句 font-weight: bold 成為首選的設置粗體的手法。<b> 這種樣式標簽通常被唾棄,而 <strong> 這樣的語義標簽受推崇。
后來 HTML5 興起,重新界定了 <b> <i> <strong> <em> 這幾個相似標簽的意義。直接從?HTML5 規范原文來看,其實很清楚:
<em>:「stress emphasis of its contents」——強調內容。<strong>:「strong importance for its contents」——著重內容。Emphasis 和 importance 的區別對于漢語使用者來說可能也比較難把握。但如果你熟悉英語的寫作格式,你會明白格式化為斜體的各種強調文本與格式化為粗體的著重文本的區別。英語等西文的正文中,粗體其實是很少出現的。
<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」——無強調或著重意味的斜體(italic),比如生物學名、術語、外來語(比如「de facto」這樣的英語里常用的拉丁語短語)……<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」——無強調或著重意味的粗體(bold),比如文章摘要中的關鍵詞、評測文章中的產品名稱、文章的導言……