Spread the word

Friday, March 18, 2011

Differences Between Strict and Transitional DOCTYPEs

Attributes which are deprecated in Strict DOCTYPEs:

  • align (allowed on elements related to tables only, like - col, colgroup, tbody, td, tfoot, th, thead, and tr)

  • target

  • language

  • background

  • link

  • hspace

  • noshade

  • nowrap

  • bgcolor

  • text

  • vspace

  • vlink

  • alink

  • height (allowed on img and object)

  • border (allowed on table)

  • width (allowed on img, object, table, col, and colgroup)

  • name (allowed in HTML 4.01 Strict, not allowed on form and img in XHTML 1.0 Strict)

Elements which are deprecated in Strict DOCTYPEs:

  • font

  • center

  • iframe

  • u

  • strike

Notable Contextual Differences:

  • Image and text contents now need to be contained within some block level elements like div or p

  • text in blockquote elements also must be contained in some block level element like div or p

  • input elements must not be direct descendants of a form element

Since Strict DOCTYPE drops some useful attributes, some web designers and programmers may prefer to use XHTML 1.0 Transitional over XHTML 1.0 Strict. Many designers still prefer to use target="_blank" at a high rate for their web pages where they don't want users to leave the current page. But it has been based on user studies that W3C has reached to the decision that target="_blank" is not a good practice when it comes to user experience. It should always be the users decision whether to open a new browser window or not, since they have choices when they are not forced to open a one. Second concerns has been raised for the start attribute of lists (specially ordered lists).


Post a Comment