使用< table>标签上的“现代”标签。网站? [英] Does it make sense to use the <table> tag on a "modern" website?

查看:134
本文介绍了使用< table>标签上的“现代”标签。网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个现代化的网站,我有很多麻烦获取CSS,使一切正常。我觉得他们的布局会很容易,如果我只是使用一个表,但我一直避免< table> 标签,因为我被告知,是老式的,而不是正确的做事方式。

I am developing a "modern" website, and I'm having a lot of trouble getting the CSS to make everything line up properly. I feel like they layout would be a lot easier if I just used a table, but I've been avoiding <table> tags, because I've been told that they are "old-fashioned" and not the right way to do things.

是否可以使用表?我如何决定何时表是合适的,以及何时应该使用CSS?我只是做更容易吗?

Is it okay to use tables? How do I decide when a table is appropriate, and when I should use CSS instead? Do I just do whatever is easier?

推荐答案

答案是肯定的,可以使用表。一般的经验法则是,如果你正在显示表格数据,表可能是一个很好的方法。

The answer is yes, it's fine to use tables. The general rule of thumb is that if you are displaying tabular data, a table is probably a good way to go. You should generally try to style your table with css as much as you can though.

此外,这个饼图可能会帮助你:

Also, this pie graph might help you:

编辑:表格正常。用于显示数据。就像我的第二句话。问题是是否可以使用表。答案是 - 是的,可以使用表。这不是非法的。

EDIT: Tables are fine. For displaying data. Just like my second sentence stated. The question was "is it ok to use tables". The answer is - yes, it is ok to use tables. It is not illegal.

因为即使它暗示在我的一般经验法则中使用表的数据,显然我还必须说明的推论是,它不是确定使用表的任何东西,即使海报已经似乎抓住这个概念。所以,对于记录,一般的经验法则是不使用表格来布局您的网站。

Since even though it's implied to use tables for data in my general rule of thumb, apparently I must also state that the corollary is that it's not ok to use tables for anything else, even though the poster already seemed to grasp this concept. So, for the record, the general rule of thumb is to not use tables for laying out your site.

这篇关于使用&lt; table&gt;标签上的“现代”标签。网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆