As I’ve undergone the transition from HTML to XHTML I’ve collected various bits of information that I found useful. The following items provide an overview of the some of the more nagging issues that came up.
Anchor - target=”" attribute
Since the target=”" attribute is not valid in strict XHTML 1.0, the following allows the target to be used with a minimum of JavaScript.
The onclick=”" atttribute is valid XHTML. For those users with Javascript turned off, the link simply loads in the same frame.
<a xhref=”http://www.site.com/path_to_page.html” mce_href=”http://www.site.com/path_to_page.html” onclick=”target=’_blank’”>My Link<a>
TD - nowrap attribute
nowrap is not XHTML compliant since it doesn’t have the required quotes. However, transitionally it is legal to put nowrap=”nowrap”.
For a purer version use the style=”white-space:nowrap” css mark-up. Or, put it in an external stylesheet.
IMG - align=”" attribute
Since the align attribute is not valid in XHTML 1.0 we need to find the css equivalents. Instead of one css equivalent, however, there are a couple to consider. For horizontal aligning, use the “float” attribute. For vertical alignment use the “vertical-align” attribute.
Valid _float_ values: float:left or float:right
Valid _vertical-align_ values: top, bottom, middle, text-top, text-bottom, baseline.