Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The HTML 5 Layout Elements Rundown : Page 3

HTML 5 is a broad specification with dozens of distinct changes from HTML 4. Get a comprehensive breakdown of the HTML 5 layout elements.


advertisement

Deprecated Elements

There aren't a large number of deprecated elements in HTML 5, but there are a few. Here are the ones that emerged in the earliest days of the web and in general are better handled by more specific content:
  • <applet>: The <applet> tag appeared at a time when Java was widely predicted to be the next major client language. It has long since been made obsolete by other developments. The <applet> tag is deprecated in HTML 5, and in general, people should make use of the <object> or <embed> tags instead to accomplish the same things.
  • <marquee>: The <marquee> tag was intended to provide a bit of animated eye candy in the early days of the browser by scrolling content within a given div element. The capabilities of the marquee are now far better handled via CSS and JavaScript as appropriate, especially as it is only one (and not a widely used one at that) of hundreds of different AJAX-like behaviors for performing animation capabilities within browsers.
  • <acronym>: The acronym tag was originally intended to encode acronyms for identification, but it was too similar to the shorter <abbr> tag, which should be used instead.
  • <dir>: This was originally used to create a directory listing assuming static content, but has become obsolete because of new elements. Use <ul> instead.
  • <frame>, <frameset>, and <noframes>: The frame is officially dead. This bane of web designers, SEO specialists, programmers, and security experts has now been officially expunged from the HTML language. If you have to use embedded content, use the <iframe> element instead. Most of the needs for frames generally could be accomplished via AJAX or related local client/server interactions as well.
  • <isindex>: This holdover from the archeo-HTML era was so obscure that I had to look it up. The <isindex> element creates a single-line text input control. Use <input type="text"> instead.
  • <basefont>,<big>, <blink>, <center>, <font>, <s>, <spacer>, <strike>, <tt>, and <u>: CSS has made all of these obsolete (it's made <b> and <i> obsolete too, of course, but these are too heavily embedded in the design psyche to ever fully remove). In general, if you need these, use a <span> with @style or (better) @class attribute instead.

In addition to these obsolete elements, a few obsolete attributes also have been deprecated:

  • @name: Used on elements, this should be replaced with the @id attribute. So #idname will now point to the <a> element with an @id of "idname" rather than an @name of "idname."
  • @alink, @background, @bgcolor, @link, @text, @vlink: These controlled the color (or background image in the case of @background) for the body element or any contained content within the body. All of these now have CSS analogs, which should be used accordingly in HTML 5.

Given the prevalence of HTML generators (of varying ages) out there, these likely will take a while to fade away. However, the message in nearly all cases is clear: CSS is the presentation layer for HTML and should be treated accordingly.



Towards a Document Language

When HTML was first introduced in 1991, the language was very much geared towards its original purpose: creating citation abstractions for scientific documents. The 3.0 and 4.0 releases have left that original purpose behind, but a significant amount of current development has made HTML almost too generic—nothing but <div> and <span> elements—and as a consequence it is losing much of the structure that provides at least the foundation of document structure. While HTML 5 includes significant concessions to the AJAX revolution, one of its more fundamental goals is to make the language an appropriate document language. While time will tell whether the changes being introduced now succeed in achieving that goal, they are certainly a good, productive start.

The next piece in this series will focus on the forms content and data-binding model associated with HTML 5, including many of the new input elements, list and table data-binding facilities, and DOM support for the same.



Kurt Cagle is the managing editor for XMLToday.org and a contributing editor for O'Reilly Media. He is currently working on a book about XBRL. Follow him on Twitter at twitter.com/kurt_cagle.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap