Video: Deprecated elementsIf there is one thing that we've learned from working drafts, it's that nothing is certain. At first it looked as though no elements from HTML 4 would be deprecated. Something that caused a bit of a stir based on some of the rarely used legacy tags, such as the font tag, that have long ago seen their functionality be replaced by CSS. Using the font tag, for example, is a bad practice, so the argument was, why let it continue? As usual, it's never that simple. One of the reasons that HTML5 won out over XHTML 2 is that it's designed to be backwards compatible.
Viewers: in countries Watching now:
In HTML5 First Look, author James Williamson introduces the newest HTML specification, providing a high-level overview of HTML5 in its current state, how it differs from HTML 4, the current level of support in various browsers and mobile devices, and how the specification might evolve in the future. Exercise files accompany the course.
- Understanding the history of HTML5
- Using new tags
- Understanding HTML5 semantics
- Coding ID and class attributes in HTML5
- Structuring documents
- Building forms
- Exploring HTML5 native APIs
- Encoding and adding HTML5 video
- Exploring associated technologies such as CSS3
If there is one thing that we've learned from working drafts, it's that nothing is certain. At first it looked as though no elements from HTML 4 would be deprecated. Something that caused a bit of a stir based on some of the rarely used legacy tags, such as the font tag, that have long ago seen their functionality be replaced by CSS. Using the font tag, for example, is a bad practice, so the argument was, why let it continue? As usual, it's never that simple. One of the reasons that HTML5 won out over XHTML 2 is that it's designed to be backwards compatible.
XHTML 2.0 sought to enforced well-written code by using very harsh error handling. If a page returned an error based on syntax, the user agent was to stop parsing the page altogether. The problem with this is that early versions of HTML didn't quantify error handling at all. As such, it was common for user agents to tolerate badly written code and still render the page. So for years, web designers, developers, and applications were able to get away with writing very poor HTML.
Of course, I'm not talking about you. Just all those other guys. By suddenly requiring user agents to enforce these strict error-handling rules, millions of older web pages would suddenly stop working. So that leaves us with a bit of a catch 22. HTML5 is written so that no document type definition is given. It's just to be rendered as an HTML file. Because of this, if browsers still have to know what the font tag is and render it properly for older pages, what's to stop somebody from using it? Well, in short, nothing.
To address this quandary, HTML5 addresses its specifications to two audiences: authors and user agents. The specification clearly states that certain elements are not to be used, deprecated if you will, while instructing user agents to still support them for legacy files. Problem solved? Well, we'll see. In the meantime, here are the tags that are to be deprecated in HTML5 and that should not be used to author HTML5 content. The basefont, big, center, font, s, strike, tt, and u, or underline tags, have all been removed due to their presentational nature.
Chances are that you're currently performing all of these tasks through CSS, so you'll probably never notice their absence. However, if you're still underlining code with the u element, it is time to stop. Another set of tags removed due to accessibility and usability concerns. The frame, frameset, and noframes elements have been removed, hopefully driving a stake into the heart of frame-based layouts everywhere. The acronym, applet, isindex, and directory elements have also been removed.
This was due to very low usage of the tags, or in the case of the directory and applet, other tags that best handle their functionality. Now for the most part, you probably won't miss most of these elements. A more noticeable change is the removal of several tag attributes for various reasons. Here are a few of the more notable ones. The rev and character set attributes have been removed from the link and a tags. The image tag sees the long description and name attributes removed. Version has been removed from html tag.
And in one of the most contentious removals, the abbreviation attribute has been removed from the table header element and the scope attribute removed from the table data element. Presentational attributes have been stripped away as well. Some of the highlights include the align attribute being stripped from all block level elements. The background attribute from the body tag, the hspace and the vspace attributes on the image tag, and the type attribute from lists. Tables have really seen a great deal of change in regard to stripped attributes.
The background color attributes has been stripped from the table, table data, table row, table header and body tags. The border, cell spacing and cell padding attributes from the table tag itself, and the height and width attribute has been removed from the table data and table header tags. Also, the vertical align attribute has been removed from table elements as well. Keep in mind that HTML5 is a working draft. Many of these changes are still under debate and it remains to be seen if they will remain deprecated or if other current elements and attributes will join them.
There are currently no FAQs about HTML5 First Look.