Scroll page back to the top

Obsolete features in HTML5

HTML5 has been around for quite a while now and we all love it. It makes our code cleaner, provides the new structural elements (semantic code), which make our pages more understandable and gets rid of the redundant attributes - making everything more compact.

However, it might be quite disappointing for someone who just switched to HTML5 to find out that their code does not validate any more.

The HTML5 has dropped support for a wide range of tags and their attributes, and this article is the introduction to those changes. We will not be able to cover all of them, but we will discuss the most common ones. It is worth to mention that HTML5 specification hasn't been completed yet therefore there is a chance that this list will expand in the future.

<html>

The main wrapper tag is now short by the version attribute.

<body>

The main body tag now removes support for:
alink, bgcolor, link, marginbottom, marginheight, marginleft, marginright, margintop, marginwidth, text, vlink, background.

<img> tag

If your img tag have a border of 0, then remove it all together and define it in css as this will trigger a warning with the conformance checkers.

Additionally the following attributes are no longer valid for img tag when used with HTML5:
name, longdesc, lowsrc, datasrc, datafld, align, hspace, vspace.

<a>

The a tag has the following removed from HTML5 specification:
charset, coords, shape, methods, name, rev, datasrc, datafld

<p>

So far p tag only says goodbye to the align attribute.

<br>

The new line tag is now getting rid of clear attribute.

<table>

The table tag is now short of the following:
datapagesize, summary, datasrc, dataformatas, align, bgcolor, cellpadding, cellspacing, frame, rules, width, background

The border attribute, when used with the table can only contain empty string or the value 1
(border="" / border="1") - other values are considered to be obsolete.

<tbody>, <thead>, <tfoot>

All of the above are now happy without:
align, char, charoff, valign, background

<tr>

The following are considered to be obsolete for the tr tag:
align, bgcolor, char, charoff, valign, background

<td>, <th>

Table cells and headings are now free of:
abbr, axis, align, bgcolor, char, charoff, height, nowrap, valign, width

<ul>

Unordered list is now short by:
type and compact

<li>

Unordered list item removes:
type

<pre>

The pre is now without:
width

<script>

The script tag is saying goodbye to:
event, for and language

<select>

The select tag is now without:
datasrc, datafld, dataformatas

<option>

The following attributes are no longer valid for the option tag:
name, datasrc, dataformatas

<input>

The following are no longer valid for the input tag:
datasrc, datafld, dataformatas, align, hspace, vspace, usemap

<iframe>

The following are taken away from the iframe tag:
longdesc, datasrc, datafld, align, allowtransparency, frameborder, hspace, marginheight, marginwidth, scrolling, vspace

<hr>

The horizontal line is now short by:
align, color, noshade, size, width

<h1> - <h6>

Headings have removed support for align

<object>

The object tag has been freed of:
align, border, hspace, vspace, datasrc, datafld, dataformatas, archive, classid, code, codebase, codetype, declare, standby

There are obviously more tags and attributes, which have been affected. If you'd like to read more on the subject visit www.w3.org.

 
 
 
Add a comment
Add Comment