Treasury Board of Canada Secretariat
Symbol of the Government of Canada

Alternatives for Deprecated Elements and Attributes

Table of Contents

1.0 Introduction

It is important to eliminate deprecated and prohibited elements and attributes so that Web pages are more accessible and comply with Common Look and Feel (CLF) Standards. This document also provides a list of approved elements.

2.0 Deprecated elements

Element Alternative
applet Use the <object> element instead.
b Although technically not deprecated, W3C recommends the <strong> element be used instead.
basefont Use CSS instead.
e.g. body{font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 100%;}
center Use CSS instead. Please read How to align text, images and form controls for instructions on aligning content.
dir Use the <ul> element instead.
font Use CSS instead.
e.g., .textStyle{font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 100%; font-style: italic; font-weight: bold;}
i Although technically not deprecated, W3C recommends the <em> element be used instead.
isindex Use the <input /> element instead.
menu Use the <ul> element instead.
s Use the text-decoration CSS property instead.
e.g., .strikeStyle{text-decoration: line-through;}
strike Use the text-decoration CSS property instead.
e.g., .strikeStyle{text-decoration: line-through;}
u The <u> element should be avoided since clients may be confused by underlined text that is not a link. If underlining is still required, use the text-decoration CSS property instead.
e.g., .underlineStyle{text-decoration : underline;}

3.0 Deprecated attributes

Element Element(s) deprecated for Alternative
align applet (deprecated), caption, div, h1, h2, h3, h4, h5, h6, hr, iframe, img, input, legend, object, p, table Use CSS to align content. Please read How to align text, images and form controls for instructions on aligning content.
alink body Use the a:active CSS property to specify the colour for active links.
e.g., a:active{color: #000000;}
alt
applet (deprecated) Use the <object> element instead.
archive
applet (deprecated) Use the <object> element instead.
background
body Use the background-color CSS property instead to specify the background colour for <body> .
e.g., body{background-color: #FFFFFF;}
bgcolor
body, table, td, th, tr Use the background-color CSS property to specify the background colour for a container.
e.g,  .greyBG{background-color: #CCCCCC;}
border
img, object Use CSS to specify the border.
e.g., .borderStyle{border: 3px solid #000000;}
clear br Use the clear CSS property instead.
e.g., .clearStyle{clear: left;}
code applet (deprecated) Use the <object> element instead.
codebase applet (deprecated) Use the <object> element instead.
color basefont (deprecated), font (deprecated) Use CSS to specify the color.
e.g,  .red{color: #CC0000;}
compact dir (deprecated), dl, menu (deprecated), ol, ul Use CSS to control the margins for the lists.
e.g,  .ulMargin{margin-left: 5px;}
face basefont (deprecated), font (deprecated) Use CSS to specify the font.
e.g., .textStyle{font-family: Verdana, Arial, Helvetica, sans-serif;}
height td, th Use the height CSS property instead.
e.g., .tdHeight{height: 25px;}
hspace img, object Use CSS instead.
e.g., .hspaceStyle{padding-right: 3px; padding-left: 3px;}
language script Use the type attribute instead.
e.g., <script type="text/javascript" src=""></script>
link body Use the a:link CSS property to specify the colour for non-visited links.
e.g., a:link{color: #0000FF;}
name applet (deprecated) Use the <object> element instead.
noshade hr Use CSS instead.
e.g., .hrStyle{border-style: solid;}
nowrap td, th Use the white-space CSS property instead.
e.g., .noWrap{white-space: nowrap;}
object applet (deprecated) Use the <object> element instead.
prompt isindex (deprecated) Use the <input /> element instead.
size hr, basefont (deprecated), font (deprecated) Use the height CSS property instead.
e.g., .hrSize{height: 5px; }
start ol There is no need to specify the starting number since an ordered list should not be separated.
style All Although technically not deprecated, inline styles should never be used for reasons of accessibility. Use the class attribute instead.
e.g., <p class="someStyle">
target All Although technically not deprecated, the target attribute is not supported by any strict DTDs (HTML 4.01 Strict or XHTML 1.0 Strict). It is also related to numerous accessibility and display issues.
text body Use the color CSS property to specify the text colour for the <body> element.
e.g., body{color: #000000;}
type li, ol, ul Use the list-style-type CSS property instead.
e.g., .listStyle{list-style-type : disc;}
value li There is no need to specify the starting number since an ordered list should not be separated.
version html Use the DOCTYPE declaration instead.
vlink body Use the a:visited CSS property to specify the colour for visited links.
e.g., a:visited{color: #000099;}
vspace img, object Use CSS instead.
e.g., .vspaceStyle{padding-top: 3px; padding-bottom: 3px;}
width hr, td, th, applet (deprecated), pre Use the width CSS property instead.
e.g., .widthStyle{width: 20%;}

4.0 Approved elements

  1. <a></a>
  2. <abbr></abbr>
  3. <acronym></acronym>
  4. <address></address>
  5. <area />
  6. <base />
  7. <bdo></bdo>
  8. <big></big>
  9. <blockquote></blockquote>
  10. <body></body>
  11. <br />
  12. <button></button>
  13. <caption> </caption>
  14. <cite></cite>
  15. <code></code>
  16. <col />
  17. <colgroup></colgroup>
  18. <dd></dd>
  19. <del></del>
  20. <dfn></dfn>
  21. <div></div>
  22. <dl></dl>
  23. <dt></dt>
  24. <em></em>
  25. <fieldset></fieldset>
  26. <form></form>
  27. <frame />
  28. <frameset></frameset>
  29. <h1></h1>
  30. <h2></h2>
  31. <h3></h3>
  32. <h4></h4>
  33. <h5></h5>
  34. <h6></h6>
  35. <head></head>
  36. <hr />
  37. <html></html>
  38. <iframe></iframe>
  39. <img />
  40. <input />
  41. <ins></ins>
  42. <kbd></kbd>
  43. <label></label>
  44. <legend></legend>
  45. <li></li>
  46. <link />
  47. <map></map>
  48. <meta />
  49. <noframes></noframes>
  50. <noscript></noscript>
  51. <object></object>
  52. <ol></ol>
  53. <optgroup></optgroup>
  54. <option></option>
  55. <p></p>
  56. <param />
  57. <pre></pre>
  58. <q></q>
  59. <samp></samp>
  60. <script></script>
  61. <select></select>
  62. <small></small>
  63. <span></span>
  64. <strong></strong>
  65. <style></style>
  66. <sub></sub>
  67. <sup></sup>
  68. <table></table>
  69. <tbody></tbody>
  70. <td></td>
  71. <textarea></textarea>
  72. <tfoot></tfoot>
  73. <th></th>
  74. <thead></thead>
  75. <title></title>
  76. <tr></tr>
  77. <tt></tt>
  78. <ul></ul>
  79. <var></var>