HTML5 Deprecated Tags and Attributes

September 06, 2012 0 Comments

HTML5 is deprecating the following HTML4 elements (tags) and attributes. When HTML5 is released as a working standard you should stop using them altogether. Where possible we will list alternatives and W3 recommended suggestions for replacing these elements with something better.

Deprecated Tags:

<frame> - use <iframe> with CSS, or server side includes instead
<frameset> - use <iframe> with CSS, or server side includes instead
<noframes> -
<basefont> -
<big> -
<center> -
<font> -
<strike> -
<tt> -
<acronym> - use <abbr> instead
<applet> - use <embed> or <object> instead
<dir> - use <ul> instead
Deprecated Attributes:
rev and charset attributes on <link>, <a>
shape and coords attributes on <a>
longdesc attribute on <img>, <iframe>
target attribute on <link>
nohref attribute on <area>
profile attribute on <head>
version attribute on <html>
name attribute on <img> (use id instead)
scheme attribute on <meta>
archive, classid, codebase, codetype, declare and standby attributes on <object>
valuetype and type attributes on <param>
axis and abbr attributes on <td>, <th>
scope attribute on <td>
summary attribute on <table>

HTML5 also removes these presentational attributes that were in HTML and recommends CSS now to obtain the same results:

align on <caption>, <iframe>, <img>, <input>, <object>, <legend>, <table>, <hr>, <div>, <h1> - <h6>, <p>, <col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>
alink, link, text and vlink attributes on <body>
background attribute on <body>
bgcolor attribute on <table>, <tr>, <td>, <th>, <body>
border attribute on <object>
cellpadding and cellspacing attributes on <table>
char and charoff attributes on <col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>
clear attribute on <br>
compact attribute on dl, menu, <ol>, <ul>
frame attribute on <table>
frameborder attribute on <iframe>
height attribute on <td>, <th>
hspace and vspace attributes on <img>, <object>
marginheight and marginwidth attributes on <iframe>
noshade attribute on <hr>
nowrap attribute on <td>, <th>
rules attribute on <table>
scrolling attribute on <iframe>
size attribute on <hr>
type attribute on <li>, <ol>, <ul>
valign attribute on <col>, <colgroup>, <tbody>, <td>, <tfoot>, <th>, <thead>, <tr>
width attribute on <hr>, <table>, <td>, <th>, <col>, <colgroup>, <pre>

Prakash Hari Sharma
I'm a software developer and Java enthusiast. I like clean and modular code, enjoy Agile projects and have a passion for trying out new things. I try to learn and teach every day, and occasionally I'm even able to blog about it. :)