Sonntag, 26. Juni 2011

HTML5: Deprecated Tags

HTML5 has introduced a lot of new fantastic elements that will be helpful to build better web pages. But the specification also deprecates a few tags that you maybe used in your web pages. So keep them in mind and use  the more semantically correct tags or use CSS for styling.

Presentational tags that are deprecated:

  • basefont
  • big
  • center
  • font
  • s
  • strike
  • tt
  • u

Also the support for frames has been removed. That means that the following tags are gone:

  • frame
  • frameset
  • noframes

A few other tags are replaced by better options:

  • acronym replaced by abbr
  • applet replaced by object
  • dir replaced by ul

In addition to deprecated tags there are many HTML attributes that are no longer valid:

  • align
  • link, vlink, alink and text attributes on body tag
  • bgcolor
  • height, width
  • scrolling on the frame element
  • valign
  • hspace, vspace
  • cellpadding, cellspacing, border on the table tag

Deprecated HTML attributes are:

  • target for links
  • profile for head tag
  • longdesc for img and iframe

If you plan on using HTML5 for your website, be sure to look at this elements and attributes to be compatible with the future and HTML5. You can use http://validator.w3.org to validate your page with the standards.

1 Kommentar: