-
Notifications
You must be signed in to change notification settings - Fork 131
/
Copy pathObsolete Tags cheatsheet
220 lines (178 loc) · 6.02 KB
/
Obsolete Tags cheatsheet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
Elements in the following list are entirely obsolete, and must not be used by authors:
applet
Use embed or object instead.
acronym
Use abbr instead.
bgsound
Use audio instead.
dir
Use ul instead.
frame
frameset
noframes
Either use iframe and CSS instead, or use server-side includes to generate complete pages with the various invariant parts merged in.
isindex
Use an explicit form and text field combination instead.
listing
xmp
Use pre and code instead.
nextid
Use GUIDs instead.
noembed
Use object instead of embed when fallback is necessary.
plaintext
Use the "text/plain" MIME type instead.
rb
Providing the ruby base directly inside the ruby element is sufficient; the rb element is unnecessary. Omit it altogether.
basefont
big
blink
center
font
marquee
multicol
nobr
s
spacer
strike
tt
u
wbr
Use appropriate elements and/or CSS instead.
For the s and strike elements, if they are marking up a removal from the element, consider using the del element instead.
Where the tt element would have been used for marking up keyboard input, consider the kbd element; for variables, consider the var element; for computer code, consider the code element; and for computer output, consider the samp element.
Similarly, if the u element is being used to indicate emphasis, consider using the em element; if it is being used for marking up keywords, consider the b element; and if it is being used for highlighting text for reference purposes, consider the mark element.
See also the text-level semantics usage summary for more suggestions with examples.
The following attributes are obsolete (though the elements are still part of the language), and must not be used by authors:
charset on a elements
charset on link elements
Use an HTTP Content-Type header on the linked resource instead.
coords on a elements
shape on a elements
Use area instead of a for image maps.
methods on a elements
Use the HTTP OPTIONS feature instead.
name on a elements (except as noted in the previous section)
name on embed elements
name on img elements
Use the id attribute instead.
rev on a elements
rev on link elements
Use the rel attribute instead, with an opposite term. (For example, instead of rev="made", use rel="author".)
urn on a elements
Specify the preferred persistent identifier using the href attribute instead.
nohref on area elements
Omitting the href attribute is sufficient; the nohref attribute is unnecessary. Omit it altogether.
profile on head elements
When used for declaring which meta terms are used in the document, unnecessary; omit it altogether, and register the names.
When used for triggering specific user agent behaviors: use a link element instead.
version on html elements
Unnecessary. Omit it altogether.
usemap on input elements
Use img instead of input for image maps.
longdesc on iframe elements
longdesc on img elements
Use a regular a element to link to the description.
target on link elements
Unnecessary. Omit it altogether.
scheme on meta elements
Use only one scheme per field, or make the scheme declaration part of the value.
archive on object elements
classid on object elements
code on object elements
codebase on object elements
codetype on object elements
Use the data and type attributes to invoke plugins. To set parameters with these names in particular, the param element can be used.
declare on object elements
Repeat the object element completely each time the resource is to be reused.
standby on object elements
Optimise the linked resource so that it loads quickly or, at least, incrementally.
type on param elements
valuetype on param elements
Use the name and value attributes without declaring value types.
language on script elements (except as noted in the previous section)
Use the type attribute instead.
event on script elements
for on script elements
Use DOM Events mechanisms to register event listeners. [DOMEVENTS]
datapagesize on table elements
Unnecessary. Omit it altogether.
abbr on td and th elements
Use text that begins in an unambiguous and terse manner, and include any more elaborate text after that.
axis on td and th elements
Use the scope attribute.
datasrc on any element
datafld on any element
dataformatas on any element
Use script and a mechanism such as XMLHttpRequest to populate the page dynamically. [XHR]
alink on body elements
background on body elements
bgcolor on body elements
link on body elements
text on body elements
vlink on body elements
clear on br elements
align on caption elements
align on col elements
char on col elements
charoff on col elements
valign on col elements
width on col elements
align on div elements
compact on dl elements
align on embed elements
align on hr elements
color on hr elements
noshade on hr elements
size on hr elements
width on hr elements
align on h1—h6 elements
align on iframe elements
frameborder on iframe elements
marginheight on iframe elements
marginwidth on iframe elements
scrolling on iframe elements
align on input elements
align on img elements
border on img elements (except as noted in the previous section)
hspace on img elements
vspace on img elements
align on legend elements
type on li elements
compact on menu elements
align on object elements
border on object elements
hspace on object elements
vspace on object elements
compact on ol elements
type on ol elements
align on p elements
width on pre elements
align on table elements
bgcolor on table elements
border on table elements
cellpadding on table elements
cellspacing on table elements
frame on table elements
rules on table elements
width on table elements
align on tbody, thead, and tfoot elements
char on tbody, thead, and tfoot elements
charoff on tbody, thead, and tfoot elements
valign on tbody, thead, and tfoot elements
align on td and th elements
bgcolor on td and th elements
char on td and th elements
charoff on td and th elements
height on td and th elements
nowrap on td and th elements
valign on td and th elements
width on td and th elements
align on tr elements
bgcolor on tr elements
char on tr elements
charoff on tr elements
valign on tr elements
compact on ul elements
type on ul elements
Use CSS instead.