web前端筆記:html5的標籤

在HTML4.01中: < b > < i > 是視覺要素(presentationl elements),分別表示無意義的加粗,無意義的斜體,表現樣式爲 { font-weight: bolder },僅僅表示「這裏應該用粗體顯示」或者「這裏應該用斜體顯示」,此兩個標籤在HTML4.01中並不被推薦使用; < em > 和 < strong > 是表達要素(phrase elements)。 < em > (emphasized text)表示一般的強調文本,而 < strong > (strong emphasized text)表示比 < em > 語義更強的的強調文本。而在新的 HTML5 工作草案 中: < em > 和 < strong > 仍舊是表達要素(phrase elements)。但這時的 < strong > 表示html頁面上的強調(emphasized text), < em > 表示句子中的強調(即強調語義)對於 b 和 i 標籤是這樣定義的: The b element now represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is emboldened. // b 元素現在描述爲在普通文章中僅從文體上突出的不包含任何額外的重要性的一段文本。例如:文檔概要中的關鍵字,評論中的產品名。或者代表強調的排版方式。 The i element now represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized. Usage varies widely by language. // i 元素現在描述爲在普通文章中突出不同意見或語氣或其他的一段文本,例如:一個分類名稱,一個技術術語,一個外語中的諺語,一個想法等。或者代表斜體的排版方式。從規範中可以注意到:b 和 i 元素將被賦予真正的語義。更應有預見性注意 b 、i 與 strong 、em 的不同使用 。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章