为什么我不能用德precated ALIGN =“权利”的数字上TD(表格单元格)?我不、能用、单元格、表格

2023-09-11 07:53:21 作者:称霸幼儿园

我指的是使用一个表显示表格数据,例如:为preadsheet,专注于数字,我觉得的并查看UX 应右对齐,正确的格式(带有小数数相同),以方便款项。对于数字,这看起来像语义和格式之间的边界线的情况下,对于其他类型的数据类型的像日期选择取向更加随心所欲。

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 (with same number of decimals) to facilitate sums. For numbers this looks like a borderline case between semantics and formatting, for other kind of data types like dates choosing an alignment is more arbitrary.

我当然同意使用CSS时可能的,但是CSS并不总是支持或允许我看的理由使用ALIGN =正确的,因为它提供了不错的默认值时,有对CSS的支持。出现这种情况,例如在我的版本山猫或当浏览器用户禁用CSS来打印。

I of course agree in using css when possible but css is not always supported or enabled and I see reasons to use align='right' since it gives decent default for when there is no support for css. This happens for example in my version of Lynx or when a browser user disables css to print.

猜测:像或许更多的语义属性< TD数量='真'>可以做的工作还,如果看到了如何有问题的是

Speculation: perhaps a more semantic attribute like <td number='true'> could do the work also if seen how problematic are

 <input type='number'> 

在相对于本地化HTML5 我只想从中期望对齐的权利。

in HTML5 in respect to localization I would just expect from it to align on right.

我记得也在某个时间点为难以覆盖对齐现在的CSS属性(我记得CSS设计让我把HTML删除它),但这好像不是真的(了?)

I remember also at some point in time was difficult to override align attribute with css (and I remember css designers asking me to remove it from HTML) but this seems not true (anymore?) now

我缺少的东西?我个人产生ALIGN =正确的数字在我的HTML。

Am I missing something ? I am personally generating align='right' for numbers in my html.

我的主要问题是:是否有任何原因,除了是pcated到一个HTML TD不能使用ALIGN =正确的正确格式的数字去$ P $的事实

My main question is: is there any reason except the fact that is deprecated to not use ALIGN='right' for properly formatted numbers on an HTML TD ?

感谢。

推荐答案

您听起来像你知道你在说什么,所以我会说只使用ALIGN =权利。当然,仅仅是意识到这一点的不足之处:

You sound like you know what you are talking about, so I would say just use align=right. Of course just be aware of the disadvantages of this:

更难治以后维护。如果你有多个表,并更改对齐方式,你需要做的每个表 在搜索ENGINS的可以的惩罚严重依赖日precated代码的网站 在浏览器可能在未来删除对德precated标签的支持。他们将提前anounce这虽然,所以你期望的部位恢复正在进行维护,你将有时间来解决这个问题 more dificult to maintain later. If you have multiple tables and change the alignment you will need to do this for every table search engins may penalise sites that rely heavily on deprecated tags browsers could remove support for deprecated tags in future. They will anounce this in advance though, so of you expect the site to revive ongoing maintainable you will have time to remedy this