ARCHIVED - Alternatives for Deprecated Elements and Attributes

Warning This information has been archived because it is outdated and no longer relevant.

Archived Content

Information identified as archived on the Web is for reference, research or recordkeeping purposes. It has not been altered or updated after the date of archiving. Web pages that are archived on the Web are not subject to the Government of Canada Web Standards. As per the Communications Policy of the Government of Canada, you can request alternate formats by contacting us.

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.

2.0 Deprecated elements

Element Alternative
applet Use the <object> element 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;}
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.
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%;}