Skip to content Skip to sidebar Skip to footer

Why Should I Not Use Deprecated Align='right' For Numbers On An Td (table Cell)?

I am referring to the usage a table for showing tabular data, eg: a spreadsheet, focusing on numbers, that I feel and see in UX that should be right aligned, properly formatted (wi

Solution 1:

I don’t think that aligning changes the semantics in this example. Certainly, it’s good to align the numbers, but no meaning is changed/lost when they are not aligned. It’s just a little bit harder to read the content. But this is the case for other CSS properties, too.

I wouldn’t use the align attribute. It was obsoleted for a reason ("must not be used by authors", not "should not")

Instead, have a look at Unicode’s figure space (U+2007). If you can’t use this character directly, you could use the character references:

  • hexadecimal:  
  • decimal:  

<table><tr><td>100000.00</td></tr><tr><td>&#8199;&#8199;&#8199;100.00</td></tr></table>

Post a Comment for "Why Should I Not Use Deprecated Align='right' For Numbers On An Td (table Cell)?"