March 2010

Rendering differences between XHTML 1.0 Strict and XHTML 1.0 Transitional

In some browsers, like firefox, the document type XHTML 1.0 Transitional will not activate the Standard mode as used by XHTML 1.0 Strict, but instead an "Almost Standard" mode.

One of the important differences is the handling of images inside tables. If an img-element is used inside a td-element, in the strict mode, the bottom of the image is align with the baseline for text, and hence the rendering adds some space for the part of the letters that would be underneath that baseline (i.e. g or y). This means the rendered box has additional space underneath the image.