• Legal and social consequences - Defamation or liabilitySeveral cases have been brought before the national courts against bloggers concerning issues of defamation or liability. U.S. payou...
    13 years ago

Saturday, February 12, 2011

XHTML compatibility

As of September 2007, the HTML code for the AdSense search box does not validate as XHTML, and does not follow modern principles of website design because of its use of
  • non-standard end tags, such as </img> and </input>,
  • the attribute checked rather than checked="checked",
  • presentational attributes other than id, class, or style — for example, bgcolor and align,
  • a table structure for purely presentational (i.e., non-tabular) purposes,1 and
  • the font tag.2
1: using a table structure for unintended purposes is strongly discouraged by the W3C, but nevertheless does not cause a document to fail validation — there is currently no algorithmic method of determining whether a table is used "correctly" (for displaying tabular data or for displaying elements, that get proportionally wider or narrower when browser window resizes in width without active client side scripting).
2: the font tag is deprecated but does not fail validation in any XHTML standard.

Additionally, the AdSense advertisement units use the JavaScript method document.write(), which does not work correctly when rendered with the application/xhtml+xml MIME type. The units also use the iframe HTML tag, which is not validated correctly with the XHTML 1.0 Strict or XHTML 1.0 Transitional DOCTYPEs.
The terms of the AdSense program forbid its affiliates from modifying the code, thus preventing these participants from having valid XHTML websites.
However, a workaround has been found by creating a separate HTML webpage containing only the AdSense advertisement units, and then importing this page into an XHTML webpage with an object tag. This workaround appears to be accepted by Google.

0 comments:

Post a Comment

 

Download Templates