HTML |
---|
比較 |
下表比較了不贊成使用和專有的HTML元素與屬性對一些排版引擎的支持和兼容性。請參閱各個產品的條目以獲得更多信息。除非腳註中另有規定,比較均基於穩定版本,無任何附加組件、擴展或外部程序。
在萬維網發展早期,網頁瀏覽器和網頁使用的標準還未成熟。網景、微軟和WebTV等供應商相互競爭,提供不同的瀏覽器與HTML編輯器,它們對如何構造網站都有自己的想法。這些不同的特徵導致了網頁開發者往往使用僅可被單一瀏覽器識別的元素為特定的網頁瀏覽器編碼。WebTV與IBM的WebExplorer從未被主流瀏覽器採用。
表格說明
引擎命名
這裏使用後端的引擎名而不是瀏覽器的名稱。使用各瀏覽器引擎的瀏覽器如下表所示。
- ↑ chromium / chromium/blink. chromium.googlesource.com. Google. [2014-05-27].
- ↑ 2.0 2.1 在Konqueror中,用戶可以切換排版引擎。
- ↑ WebKit Nightly Builds. webkit.org. [2014-05-27].
取值
以下各格的顏色表示該排版引擎的最新版本或指定版本(如果給出版本號的話)對該功能的支援程度。沒有取值的版本號表示該排版引擎首次完全支援該功能。
取值 | 含義 |
---|---|
是 | 表示該排版引擎完全地支援該功能或元素。 |
否 | 表示該功能或元素尚未有支援。 |
部份 | 表示該功能或元素有實作進展,但並不支援所有取值,對於已支援的取值,該實作是正確的。 |
不正確 | 表示該功能或元素有實作進展,但是實作並非在所有情況都是正確無誤的。 |
實驗性質 | 表示該功能或元素有實作進展,但是使用另外的屬性或元素名(瀏覽器前輟)。多半是不完全實作或是有過多的漏洞。 |
拋棄 | 表示該屬性/元素不再受到支援。 |
每日構建 | 表示該功能或元素在未釋出的版本有某種程度的支援。預期將有完整支援。 |
依情況 | 表示該屬性/元素僅在某些平台支援或設定在某些組態後支援。 |
不贊成使用的HTML元素
元素 | 功能 | 率先支援 | 不贊成使用的HTML版本 | 代替方案 | Trident | Gecko | WebKit | KHTML | Presto |
---|---|---|---|---|---|---|---|---|---|
applet |
插入一個小程式 | HotJava | 4[10] | embed 、object
|
<3.1[IE 4.0] | 1.7 | 是 | 是 | 1.0 |
basefont |
設置字型樣式 | Internet Explorer | 4 | CSS | <3.1[IE 3.0] | 否[11] | 85 | 是 | |
center |
內容置中 | 網景[12] | 4 | CSS | 3.1 | 是 | 是 | ||
dir |
目錄列表 | ? | 4 | ul 、ol
| |||||
font |
應用字型樣式 | 網景 | 4 | CSS | |||||
isindex [13] |
添加一個搜尋欄 | ? | 4 | input type="search"
|
<3.1[IE 5.5] | 1.7 | 312 | 部份 | |
listing |
顯示格式化文字 | IETF | 2 | pre 、samp 、code 、CSS
|
3.1 | 125 | 3.3 | 是 | |
menu |
選單列表 | ? | 4 | ul 、ol
|
是 | 是 | 是 | ||
plaintext |
所有內容按照HTML原始碼的方式顯示 | ? | 3.2 | The text/plain MIME type
| |||||
s |
刪除線 | ? | 4 | del 、CSS
|
<3.1[IE 4.0] | 1.7 | 1.0 | ||
strike |
刪除線 | ? | 4 | del 、CSS
| |||||
u |
底線 | ? | 4 | CSS | |||||
xmp |
與pre和 plaintext 相似,內容按照HTML原始碼的方式顯示 |
? | 2 | pre 、samp 、code
|
<3.1[IE 3.0] | 125 | 3.3 |
不贊成使用的HTML屬性
屬性 | 元素 | 代替方案 | Trident | Gecko | WebKit | KHTML | Presto |
---|---|---|---|---|---|---|---|
align |
caption 、div 、fieldset 、h1 、h2 、h3 、h4 、h5 、h6 、hr 、img 、input 、legend 、p 、object 、table |
CSS | 3.1 | 是 | 是 | 是 | 是 |
alink |
body |
CSS | 否 | ||||
background |
body |
CSS | 是 | ||||
bgcolor |
body 、table 、tr 、td 、th |
CSS | |||||
border |
img 、object |
CSS | 部份[注 1] | ||||
clear |
br |
CSS | 否 | ||||
compact |
dl 、ul 、ol |
CSS | 否 | 否 | |||
color |
basefont 、font |
CSS | 3.1 | 部份[注 2][11] | 部份[注 2] | ||
height |
td 、th |
CSS | 是 | 是 | |||
hspace |
img 、object |
CSS | |||||
language |
script |
type 屬性
|
? | ||||
link |
body |
CSS | 是 | ||||
noshade |
hr |
CSS | |||||
nowrap |
td 、th |
CSS | |||||
size |
basefont 、font 、hr |
CSS | |||||
start |
ol |
None | |||||
text |
body |
CSS | |||||
type |
li 、ul 、ol |
CSS | |||||
version |
html |
DTD | 否 | 否 | 否 | 否 | 否 |
vlink |
body |
CSS | 是 | 是 | 是 | 是 | 是 |
width |
hr 、pre 、td 、th |
CSS | |||||
vspace |
img 、object |
CSS |
專有HTML元素
標籤 | 功能 | 引入 | 代替方案 | Trident | Gecko | WebKit | KHTML | Presto |
---|---|---|---|---|---|---|---|---|
bgsound |
將聲音添加到網站後台 | Internet Explorer | audio
|
<3.1[IE 3.0] | 否 | 否 | 否 | 拋棄[14] |
blink |
用於顯示閃爍的文字 | 網景 | Javascript、CSS | 否 | 拋棄[15] | 是 | 否 | 1.0 |
bq |
用於顯示塊參照 | WebTV、HTML 3.0 | blockquote
|
否 | 否 | 否 | 否 | 拋棄[16] |
comment |
用於向HTML文件添加註釋 | Internet Explorer、WebTV | <!-- ... -->
|
3.1 | 否 | 否 | 否 | 否 |
ilayer |
內嵌層 | 網景(僅版本4) | iframe
|
否 | 否 | 否 | 部份 | 否 |
image |
img的同義詞 | ? | img
|
3.1 | 是 | 是 | 是 | 是 |
layer |
用於建立多層文字和圖像,在給定的順序下分佈在彼此的頂部 | 網景(僅版本4) | CSS、Ajax | 否 | 否 | 否 | 部份 | 否 |
marquee |
用於顯示類似捲動字幕的文字 | Internet Explorer、WebTV | JavaScript、CSS3 | 3.1 | 1.7 | 125 | 3.3 | 1.0 |
nobr |
防止在文字流內產生任何換行符 | 網景[17][18] | CSS | 3.1 | 是 | 是 | 是 | 是 |
noembed |
為不承認嵌入標籤瀏覽器顯示替代文字 | 網景 | 物件的子元素作為備用 | |||||
spacer |
在排版中添加空白 | 網景 | CSS | 否 | 拋棄[19] | 否 | 否 | 否 |
wbr |
放置在nobr元素中以添加一個換行符 | 網景[17][18] | Unicode字元
零寬空格 (U+200B) |
拋棄[注 3] | 1.7 | 是 | 3.1 | 否 |
xml [21] |
限定一個HTML頁面中的XML數據島 | Internet Explorer | ? | 3.1 | 否 | 否 | 否 | 否 |
專有HTML屬性
屬性 | 被廢棄 | 功能 | 率先支援 | Trident | Gecko | WebKit | KHTML | Presto |
---|---|---|---|---|---|---|---|---|
bgproperties |
body |
判定背景圖片是否與背景一起捲動 | Internet Explorer | 3.1 | 否 | 是 | 是 | 否 |
bordercolor |
body |
在table 、td 、th 與tr 元素中設置三維表格邊框的顏色 |
Internet Explorer | 否 | 是 | 是 | 否 | |
bordercolordark |
body |
在table 、td 、th 與tr 元素中設置三維表格邊框的顏色 |
Internet Explorer | 否 | 否 | 否 | 否 | |
bordercolorlight |
body |
在table 、td 、th 與tr 元素中設置三維表格邊框的顏色 |
Internet Explorer | |||||
controls |
img |
使用img 元素放置影片或音頻片段 |
Internet Explorer | 否 | 否 | 否 | 否 | |
dynsrc |
img |
使用img 元素放置影片或音頻片段 |
Internet Explorer | 否 | 否 | 否 | 否 | |
event |
script |
定義一個函數用於呼叫物件 | Internet Explorer | 部份 | ? | ? | ? | |
for |
script |
定義一個物件用於繫結指令碼事件 | Internet Explorer | 部份 | ? | ? | ? | |
frame |
table |
在table標籤中控制表的外邊界顯示 | Internet Explorer | 是 | ? | 是 | 否 | |
framespacing |
frameset |
設置框架之間空間的多少 | Internet Explorer | ? | ? | 否 | 否 | |
leftmargin |
body |
設置瀏覽器窗口和網頁內容之間的邊距 | Internet Explorer | 3.1 | ? | ? | 是 | 否 |
loop |
img |
使用img 元素放置影片或音頻片段 |
Internet Explorer | 否 | 否 | 否 | 否 | |
rightmargin |
body |
設置瀏覽器窗口和網頁內容之間的邊距 | Internet Explorer | 3.1 | ? | ? | 否 | 否 |
start |
img |
使用img 元素放置影片或音頻片段 |
Internet Explorer | 否 | 否 | 否 | 否 | |
target |
form |
為表單的輸出指定目標窗口或框架 | Internet Explorer | 否[22] | ? | 是 | 否 | |
valign |
caption |
將表格標題的設置為垂直對齊 | Internet Explorer | 3.1 | ? | ? | 否 | 否 |
參見
註釋
參考文獻
- ↑ Amaya Binary Releases, Most recent download link in stable
- ↑ Change log between EdgeHTML 12.10240 and 13.10586
- ↑ Firefox 77.0.1, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-03.
- ↑ Firefox ESR 68.9.0, See All New Features, Updates and Fixes. mozilla.org. Mozilla基金會. 2020-06-02.
- ↑ Firefox — Beta Notes (61.0beta) — Mozilla. 2018-06-26 [2018-06-26].
- ↑ Mozilla Firefox Web Browser — Download Firefox Beta in your language — Mozilla. [2016-08-10].
- ↑ Firefox - Notes (62.0a1) — Mozilla. 2018-06-26 [2018-06-26].
- ↑ Mozilla Firefox Web Browser — Download Firefox Nightly in your language — Mozilla. [2018-01-23].
- ↑ Download for kdelibs, Most recent download link in stable
- ↑ HTML 4 Changes, W3C, 1997-12-18 [2008-05-07]
- ↑ 11.0 11.1 Bug 3875 - (basefont) deprecated basefont element not supported, Mozilla, [2016-02-06]
- ↑ HTML 3.2 Reference Specification, W3C, 1997-01-14 [2008-10-08]
- ↑ Isindex Example, [2008-05-07]
- ↑ Tommy A. Olsen. Opera Desktop Team - Glyphs and plugins. 2011-11-28 [2011-11-28].
CORE-34613 Drop support for <bgsound>
- ↑ Mozilla Aurora Notes. Mozilla. [2013-06-01].
- ↑ gsnedders. IRC logs: freenode / #whatwg / 2010-09-09. 2010-09-09 [2010-09-09].
# [17:27] <gsnedders> I know we dropped support for the bq element :P
- ↑ 17.0 17.1 Complete List of HTML Tags. [2011-10-10].
- ↑ 18.0 18.1 Extensions to HTML. Netscape. 1994 [2011-10-10].
- ↑ Bug 531056 - [HTML5] Remove spacer support, Mozilla, [2016-02-06]
- ↑ Zeilenumbruch erlauben, Impressum, [2016-02-06] (德語)
- ↑ XML Element | xml Object, Microsoft, [2016-02-06]
- ↑ Bug 207900 - psychotekk.de - the target attribute in the form element is ignored, Mozilla, [2016-02-06]