Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML Deprecated Attributes

Deprecated attributes are attributes that are no longer supported by HTML.

For this reason, you should not use these, and use alternatives instead.

Browser support:

  • Browsers do support deprecated attributes for a while, but at some point it will stop.
  • With HTML5 the number of attributes has been reduced in favor of CSS.
  • Deprecated attributes are often easily handled with CSS.
  • For example, instead of HTML bgcolor use CSS background-color.

List of Deprecated Attributes

This table lists the deprecated HTML attributes. It has the attribute, the HTML elements affected, a description, and the alternatives you can use.

Attribute Elements Description Alternative
abbr td Contains abbreviated description of a cell's content. <abbr>
accept form List of file extensions that are accepted in file picker. accept attribute
align caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. Aligns the content in an element. CSS text-align
alink body Specifies color of active links in a page. CSS :active
archive object List of URLs for resource archives for the object. n/a
axis td, th List of header ids that cell applies to or vice versa. headers attribute
autocapitalize any tag Autocapitalizes text entered by the user. autocapitalize attribute
background body Specifies URL of background image for a page. CSS background-image
bgcolor table, tr, td, th and body. Defines background color for element. CSS background-color
border table and object Defines the border thickness around the element. CSS border
bottommargin body Specifies the margin to the bottom of the page CSS margin-bottom
cellpadding table Defines space between cells and their borders CSS padding
cellspacing table Defines the size of the space between table cells. CSS border-collapse
char col, colgroup, tbody, td, tfoot, th, thead and tr. Aligns content to a character, for example "," or ".". n/a
charset script, link, and a Sets character encoding of linked URL. Content-Type HTTP header
charoff col, colgroup, tbody, td, tfoot, th, thead and tr. Shifts column data to the right relative char attribute. CSS text-align
classid object The URL of the object's implementation. n/a
clear br Specifies where to start the next line after the break. n/a
codebase object Base path for URLs specified by classid, data, or archive. <base>
codetype object Defines content type of the data specified by classid. n/a
cols pre Sets the preferred character count for a line. CSS width
compact dl, menu, ol and ul. Renders the list in a compact style CSS line-height
coords a A comma-separated list of coordinates <area>
declare object Makes this element a declaration only. Still needs instantiation. n/a
frame table Defines on which side a border should be displayed. CSS border
frameborder iframe Draws a border around the frame CSS border
height td Sets the height of an element CSS height
hspace img and object. Horizonal spacing in pixels, left and right of element. CSS margin
language script Defines the language of the script type attribute
leftmargin body Specifies the margin to the left of the page CSS margin
link body Specifies color of unvisited links on page CSS :link
longdesc img and iframe. URL of a detailed description of the elements content n/a
manifest html Sets a URL with resources that should be cached locally. n/a
marginheight iframe Space between iframe content and top and bottom borders. CSS padding
marginwidth iframe Space between iframe content and left and right borders. CSS padding
name a, img, area, form Defines a name for the element. id attribute
nohref area Indicates no hyperlink exists for the associated area. Not providing href is sufficient
noshade hr Sets the rule to have no shading CSS box-shadow
nowrap td, th, dd Specifies that the content should not wrap CSS white-space
profile head URLs of space separated metadata profiles. n/a
rev link, a Specifies a reverse link. The opposite of rel. n/a
rightmargin body Specifies the margin to the right of the page CSS margin-right
rules table Defines which table lines should be drawn CSS border
scheme meta Defines format or URL for interpreting the content attribute n/a
scope th Defines the data cells the header is related to. headers attribute
scrolling iframe Specifies when scrollbar should appear on iframe. CSS overflow
shape a The shape of a link's region in an image map <area>
size hr Sets the height of the rule CSS height
sorted the Specifies the sort direction of the column n/a
standby object A message while object and data are loading. n/a
summary table Defines alternative text that summarize table <caption>
tabindex object, area The position of the element in the tabbing sequence. tabindex attribute
target link Defines a frame or window that has additional info on the link n/a
text body Specifies text color of the page. CSS color
topmargin body Specifies the margin to the top of the page CSS margin-top
type li, ol, ul, param, area The type of list or item with bullets. CSS list-style-type
valign col, colgroup, tbody, td, tfoot, th, thead, tr Sets the vertical alignment of content in the element CSS vertical-align
valuetype param Specifies the type of the value: data, ref, or object n/a
version html Specifies the DTD (data type definition) version of the HTML. Redundant in HTML5. n/a
vlink body Specifies color of visited links on the page CSS :visited
vspace img, object Vertical spacing in pixels, top and bottom of element. CSS margin
width hr, table, td, th, col, colgroup, pre Sets the width of the element CSS width
wrap pre Suggests how text overflow should be handled CSS overflow

You may also like


Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides