Prior to HTML5
Global structure elements
The global structure of the document.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Basic structure
|
---|
html
|
<3.1[IE 5.0] |
Yes
|
Yes
|
Yes
|
1.0
|
head
|
<3.1[IE 4.0] |
body
|
Metadata
|
---|
title
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
meta
|
Headings
|
---|
h1
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
h2
|
h3
|
h4
|
h5
|
h6
|
Grouping elements
|
---|
div
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
span
|
Text elements
Elements that represent text.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Phrase
|
---|
em
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
strong
|
dfn
|
code
|
samp
|
kbd
|
var
|
cite
|
acronym
|
abbr.
|
3.1
|
Quotations
|
---|
blockquote
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
q
|
4.0
|
1.8[note 1] |
Subscripts and superscripts
|
---|
sub
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
sup
|
Lines and paragraphs
|
---|
p
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
pre
|
br
|
<3.1[IE 5.0] |
Marking document changes
|
---|
ins
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
del
|
List elements
Elements that represent lists of information.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Unordered and ordered lists
|
---|
ul
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
ol
|
li
|
Definition lists
|
---|
dl
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
dt
|
dd
|
Table elements
Elements that represent tabular information.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Basic table elements
|
---|
table
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
caption
|
tr
|
th
|
td
|
Row groups
|
---|
thead
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
tbody
|
tfoot
|
Column groups
|
---|
colgroup
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
col
|
Link elements
Hyperlinks, one of the primary forces driving the success of the World Wide Web.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
a
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
link
|
base
|
Multimedia elements
Multimedia features including images, applets, video clips, and other HTML documents.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Images
|
---|
img
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
Generic inclusion
|
---|
object
|
4.0[note 2] |
1.0
|
Yes
|
Yes
|
1.0
|
param
|
<3.1[IE 6.0] |
Image maps
|
---|
map
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
area
|
5.0
|
Frame elements
Elements to present documents in multiple views, which may be independent windows or subwindows. Frame layout is only available in the frameset profiles. All frames are not available in XHTML 1.1 (use generic object elements instead for inline frames).
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Frame layout
|
---|
frameset
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
frame
|
noframes
|
Inline frames
|
---|
iframe
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
Form elements
The user interface controls for interacting with the web server.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Basic structure
|
---|
form
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
fieldset
|
legend
|
Form controls and labels
|
---|
button
|
<3.1[IE 4.0] [note 3]
|
1.0
|
Yes
|
Yes
|
1.0
|
textarea
|
<3.1[IE 4.0] |
input
|
label
|
3.4.2[note 4] |
List boxes (combo boxes)
|
---|
select
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
optgroup
|
option
|
Presentational elements
Elements that specify presentational information. Although not all elements are deprecated, their use is discouraged in favor of stylesheets. Deprecated elements are not available in the strict profiles and XHTML 1.1.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Font styles
|
---|
b
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
i
|
big
|
small
|
tt
|
Horizontal rules
|
---|
hr
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
Stylesheet elements
The ways to apply stylesheets (CSS) to the document.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
<link rel="style" ... />
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
style
|
6.0[note 5] |
Script elements
Elements for embedding client-side script (JavaScript). See also DOM Events for a list of attributes used to attach an event handler to an element.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
script
|
<3.1[IE 5.0] |
1.0
|
Yes
|
Yes
|
1.0
|
noscript
|
Incorrect[note 6] |
Language elements
Elements related to language information.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
bdo
|
<3.1[IE 5.0] |
1.0
|
Yes
|
Partial[note 7] |
1.0
|
Generic attributes
Attributes that can be used in any elements.
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
Element identifiers
|
---|
id
|
<3.1[IE 3.0] |
1.0
|
Yes
|
Yes
|
1.0
|
class
|
Inline styles
|
---|
style
|
<3.1[IE 3.0] |
1.0
|
Yes
|
Yes
|
1.0
|
Advisory information
|
---|
title
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
Language information
|
---|
lang
|
<3.1[IE 4.0] |
1.0
|
Yes
|
Yes
|
1.0
|
dir
|
<3.1[IE 5.0] |
Non-standard items
In the early years of the Web, the standards which today are used in most web browsers and web pages were mostly non-existent. Different browsers and HTML editors were being offered by competing vendors such as Netscape and Microsoft, who had competing ideas for how web sites should be constructed. These varying features resulted in web developers coding for specific web browsers, using elements which could often be recognized by only one browser.
These tables list browser engine support for non-standard HTML items.
Element
|
Function
|
Supported first by
|
Deprecated in HTML version
|
Alternative solution
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
applet |
Insert an applet |
HotJava |
4[7] |
embed , object
|
<3.1[IE 4.0] |
1.7
|
Yes
|
Yes
|
1.0
|
basefont |
Sets font styles |
Internet Explorer |
4 |
CSS
|
<3.1[IE 3.0] |
No[8] |
85
|
Yes
|
center |
Centers contents |
Netscape[9] |
4 |
CSS
|
3.1
|
Yes
|
Yes
|
dir |
Directory list |
? |
4 |
ul , ol
|
font |
Applies font styles |
Netscape |
4 |
CSS
|
isindex [10] |
Adds a search field |
? |
4 |
input type="search"
|
<3.1[IE 5.5] |
1.7
|
312
|
Partial
|
listing |
Displays preformatted text |
IETF |
2 |
pre , samp , code , CSS
|
3.1
|
125
|
3.3
|
Yes
|
menu |
Menu list |
? |
4 |
ul , ol
|
Yes
|
Yes
|
Yes
|
plaintext |
Designates that all HTML be ignored, and to display the page as is |
? |
3.2 |
The text/plain MIME type
|
s |
Strike-through |
? |
4 |
del , CSS
|
<3.1[IE 4.0] |
1.7
|
1.0
|
strike |
Strike-through |
? |
4 |
del , CSS
|
u |
Underline |
? |
4 |
CSS
|
xmp |
Similar to pre and plaintext , but ignores all HTML within and displays as is |
? |
2 |
pre , samp , code
|
<3.1[IE 3.0] |
125
|
3.3
|
Attribute
|
Element
|
Alternative solution
|
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
|
Yes
|
Yes
|
Yes
|
Yes
|
alink |
body |
CSS
|
No
|
background |
body |
CSS
|
Yes
|
bgcolor |
body , table , tr , td , th |
CSS
|
border |
img , object |
CSS
|
Partial[note 8] |
clear |
br |
CSS
|
No
|
compact |
dl , ul , ol |
CSS
|
No
|
No
|
color |
basefont , font |
CSS
|
3.1
|
Partial[note 9][8] |
Partial[note 9] |
height |
td , th |
CSS
|
Yes
|
Yes
|
hspace |
img , object |
CSS
|
language |
script |
The type attribute
|
No[citation needed] |
link |
body |
CSS
|
Yes
|
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
|
No
|
No
|
No
|
No
|
No
|
vlink |
body |
CSS
|
Yes
|
Yes
|
Yes
|
Yes
|
Yes
|
width |
hr , pre , td , th |
CSS
|
vspace |
img , object |
CSS
|
Tag
|
Function
|
Introduced by
|
Alternative solution
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
bgsound |
Used to add sound to the background of a website |
Internet Explorer |
audio
|
<3.1[IE 3.0] |
No
|
No
|
No
|
Dropped[11] |
blink |
Used to display a blinking text |
Netscape |
Javascript, CSS
|
No
|
Dropped[12] |
Yes
|
No
|
1.0
|
bq |
Used to display a blockquote |
WebTV, HTML 3.0 |
blockquote
|
No
|
No
|
No
|
No
|
Dropped[13] |
comment |
Used to allow the addition of comments to HTML documents |
Internet Explorer, WebTV |
<!-- ... -->
|
3.1
|
No
|
No
|
No
|
No
|
ilayer |
Inline layers |
Netscape (4 only) |
iframe
|
No
|
No
|
No
|
Partial
|
No
|
image |
Synonym of img |
? |
img
|
3.1
|
Yes
|
Yes
|
Yes
|
Yes
|
layer |
Used to create multiple layers of text and images which lay on top of each other in a given order |
Netscape (4 only) |
CSS, AJAX
|
No
|
No
|
No
|
Partial
|
No
|
marquee |
Used to display a scrolling, marquee-like text. |
Internet Explorer, WebTV |
JavaScript, CSS3
|
3.1
|
1.7
|
125
|
3.3
|
1.0
|
nobr |
Prevents any line breaks from occurring within the flow of a text |
Netscape[14][15] |
CSS
|
3.1
|
Yes
|
Yes
|
Yes
|
Yes
|
noembed |
Displays an alternative text for browsers which do not recognize the embed tag |
Netscape |
Child elements of object used as fallback
|
spacer |
Adds whitespace in a layout |
Netscape |
CSS
|
No
|
Dropped[16] |
No
|
No
|
No
|
wbr |
Placed inside a nobr element to add a line break |
Netscape[14][15] |
Unicode character zero-width space (U+200B)
|
Dropped[note 10] |
1.7
|
Yes
|
3.1
|
No
|
xml [18] |
Includes XML data, either inline or from an URL, in an HTML page |
Internet Explorer |
AJAX, possibly XML namespaces
|
3.1
|
No
|
No
|
No
|
No
|
Attribute
|
Deprecated for
|
Function
|
Supported first by
|
Trident
|
Gecko
|
WebKit
|
KHTML
|
Presto
|
---|
bgproperties |
body |
Determines whether background image scrolls with the background |
Internet Explorer
|
3.1
|
No
|
Yes
|
Yes
|
No
|
bordercolor |
body |
Sets colors for 3-D table borders in the table , td , th , and tr elements |
Internet Explorer
|
No
|
Yes
|
Yes
|
No
|
bordercolordark |
body |
Sets colors for 3-D table borders in the table , td , th , and tr elements |
Internet Explorer
|
No
|
No
|
No
|
No
|
bordercolorlight |
body |
Sets colors for 3-D table borders in the table , td , th , and tr elements |
Internet Explorer
|
controls |
img |
Uses the img element to place video or audio clips |
Internet Explorer
|
No
|
No
|
No
|
No
|
dynsrc |
img |
Uses the img element to place video or audio clips |
Internet Explorer
|
No
|
No
|
No
|
No
|
event |
script |
Defines function to call for an object. |
Internet Explorer
|
Partial
|
?
|
?
|
?
|
for |
script |
Defines the object to bind a scripting event. |
Internet Explorer
|
Partial
|
?
|
?
|
?
|
frame |
table |
Controls the display of the outer borders of a table in the table tag |
Internet Explorer
|
Yes
|
?
|
Yes
|
No
|
framespacing |
frameset |
Sets the amount of space between frames |
Internet Explorer
|
?
|
?
|
No
|
No
|
leftmargin |
body |
Sets the margin between the browser window and the contents of the page |
Internet Explorer
|
3.1
|
?
|
?
|
Yes
|
No
|
loop |
img |
Uses the img element to place video or audio clips |
Internet Explorer
|
No
|
No
|
No
|
No
|
rightmargin |
body |
Sets the margin between the browser window and the contents of the page |
Internet Explorer
|
3.1
|
?
|
?
|
No
|
No
|
start |
img |
Uses the img element to place video or audio clips |
Internet Explorer
|
No
|
No
|
No
|
No
|
target |
form |
Specifies a target window or frame for the output of a form |
Internet Explorer
|
No[19] |
?
|
Yes
|
No
|
valign |
caption |
Sets vertical alignment of table caption |
Internet Explorer
|
3.1
|
?
|
?
|
No
|
No
|
HTML5
Element-specific attributes
Global attributes
Form elements and attributes
Many of these features can be emulated with third-party libraries.[citation needed]
APIs
Other features
Next-generation additions
The WHATWG version of HTML also includes additional features that are not technically HTML5, which are described as "next-generation additions still in development" in the specification.[29]
Related specifications
Media functions
The HTML5 specification defines several tags which allow video and audio to be included natively and semantically in HTML markup.
Element attributes
Media elements allow some attributes to be set directly in the tag.
DOM attributes
Some attributes related to media elements are exposed in the DOM.
|
Trident
|
Gecko
|
WebKit
|
Presto[p 31] |
---|
Error state
|
---|
MediaError
|
5.0 [t 43] |
1.9.1
|
?
|
2.5
|
---|
Network state
|
---|
src
|
5.0[t 1] |
1.9.1
|
?
|
2.5
|
---|
currentSrc
|
---|
networkState
|
---|
preload
|
2.0[note 11][g 90] |
No
|
---|
buffered
|
2.0[g 95] |
---|
load()
|
1.9.1
|
2.5
|
---|
canPlayType()
|
533[w 72] |
---|
Ready state
|
---|
readyState
|
5.0[t 1] |
1.9.1
|
?
|
2.5
|
---|
seeking
|
---|
Playback state
|
---|
currentTime
|
5.0[t 1] |
1.9.1
|
?
|
2.5
|
---|
startTime
|
No
|
---|
duration
|
1.9.1
|
---|
paused
|
---|
defaultPlaybackRate
|
20.0[g 96] |
No
|
---|
playbackRate
|
---|
played
|
15.0[g 97] |
---|
seekable
|
8.0[g 98] |
---|
ended
|
1.9.1
|
2.5
|
---|
autoplay
|
---|
loop
|
11.0[g 91] |
---|
play()
|
1.9.1
|
---|
pause()
|
---|
Controls
|
---|
controls
|
5.0[t 1] |
1.9.1
|
?
|
2.5
|
---|
volume
|
---|
muted
|
---|
DOM events
Media elements introduce new events to handle conditions which apply only to those elements, such as pausing/resuming.
|
Trident
|
Gecko[g 99] |
WebKit
|
Presto
|
---|
loadstart
|
5.0[t 44] |
1.9.1
|
?
|
?
|
---|
progress
|
---|
suspend
|
1.9.2
|
---|
abort
|
1.9.1
|
---|
error
|
---|
emptied
|
---|
stalled
|
8.0[g 100] |
---|
play
|
1.9.1
|
---|
pause
|
---|
loadedmetadata
|
---|
loadeddata
|
---|
waiting
|
---|
playing
|
No
|
---|
canplay
|
1.9.1
|
---|
canplaythrough
|
---|
seeking
|
---|
seeked
|
---|
timeupdate
|
---|
ended
|
---|
ratechange
|
---|
durationchange
|
---|
volumechange
|
---|
Video format support
This table documents support for video codecs by the <video>
element.
Audio format support
This table documents support for audio codecs by the <audio>
element.
Canvas functions
The following tables compare support for the drawing APIs of the Canvas element, a feature of HTML5. These tables compare native support by web browsers, without any plugins, add-ons or ECMAScript workarounds.
Supported contexts
Rendering Context 2D
|
Trident[t 49] |
Gecko[g 110] |
WebKit[w 82] |
Presto[p 37][p 38] |
---|
The canvas state
|
---|
save
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
restore
|
---|
Transformations
|
---|
scale
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
rotate
|
---|
translate
|
---|
transform
|
2.6[note 16][p 39][p 40][p 41] |
---|
setTransform
|
2.6[note 16] |
---|
Compositing
|
---|
globalAlpha
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
globalCompositeOperation
|
---|
Colors and styles
|
---|
strokeStyle
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
fillStyle
|
---|
createLinearGradient
|
---|
createRadialGradient
|
---|
createPattern
|
---|
Line styles
|
---|
lineWidth
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
lineCap
|
---|
lineJoin
|
---|
miterLimit
|
---|
Shadows
|
---|
shadowOffsetX
|
5.0
|
1.9.1[g 111] |
Yes
|
2.4[note 17] |
---|
shadowOffsetY
|
---|
shadowBlur
|
---|
shadowColor
|
---|
Simple shapes
|
---|
clearRect
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
fillRect
|
---|
strokeRect
|
---|
Complex shapes
|
---|
beginPath
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
closePath
|
---|
moveTo
|
---|
lineTo
|
---|
quadraticCurveTo
|
1.8.1[note 18] |
---|
bezierCurveTo
|
1.8
|
---|
arcTo
|
1.8.1[g 112] |
---|
rect
|
1.8
|
---|
arc
|
---|
fill
|
---|
stroke
|
---|
clip
|
---|
isPointInPath
|
---|
Focus management
|
---|
drawFocusRing
|
No
|
28.0[g 113] |
No
|
No
|
---|
Text
|
---|
font
|
5.0
|
1.9.1[note 19] |
Yes
|
No
|
---|
textAlign
|
2.6
|
---|
textBaseline
|
---|
fillText
|
---|
strokeText
|
---|
measureText
|
---|
Images
|
---|
drawImage
|
5.0
|
1.8
|
Yes
|
2.0
|
---|
createImageData
|
1.9.1[g 115][g 116] |
2.7[p 42] |
---|
getImageData
|
1.9[g 116] |
2.6[note 16] |
---|
putImageData
|
2.0[g 117][g 116] |
---|