Forum Moderators: open

Message Too Old, No Replies

<TD align="right"> in 4.01 strict

         

Mohamed_E

11:26 pm on Jul 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am very confused!

I believed that all uses of ALIGN="whatever" were disallowed in 4.01 strict. Yet a file with

<TD align="right">

validated at w3.org and htmlhelp.org, as well as with my local html-tidy. And htmlhelp.org showed align as a valid attribute of TD even with non-strict attributes hidden.

<div align="center"> is invalid, why is <TD align="right"> valid?

drbrain

11:44 pm on Jul 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See: HTML 4.01 11.2.6 Table cells: The TH and TD elements [w3.org]

Align for td is there to specify alignment on a character, I can only speculate why the other values are there (backwards compatibility?).

Mohamed_E

12:34 am on Jul 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I can only speculate why the other values are there (backwards compatibility?).

If I can read between the lines of that comment, you would suggest using CSS rather than HTML to accomplish that? That is what I am doing, the one <TD align="right"> that I found had slipped through the cracks :)

tedster

12:48 am on Jul 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That really is a surprise to me, too. I only began writing strict HTML (instead of transitional) a few months ago, but I was making the exact same assumption. In fact, most of my stylesheets automatically have three classes (.l,.c,.r) just so I can plug in my desired alignments on any elements I choose without too much concern.

I'm not going to change -- it might be OK in 4.01, but it sure won't be in XHTML.