为了清楚起见,表格超过Divs ......哪个更好? [英] Just for clarity, Tables over Divs...Which is better?

查看:67
本文介绍了为了清楚起见,表格超过Divs ......哪个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么DIV比TABLE更好?



我已经很老了,并且已经使用了桌子作为yonks,但是最近被告知了。

只是想知道原因。

Why is DIV better than TABLE?

I am very old and have used tables for yonks, but was told off recently.
Just wondering the reason why.

推荐答案

检查一下。



http://www.smashingmagazine.com/2009/04/08/from-table-hell- to-div-hell / [ ^ ]


很多都取决于你是否要重新定位项目;此外,您是否希望能够使用屏幕阅读器阅读您的项目。屏幕阅读器通常会有一个糟糕的桌面时间,因为它们最终可能会按照您想要的顺序读取内容。



这一切归结为,使用适合工作的工具。如果要在电子表格中显示数据,请使用表格 - 定位div来执行此操作只是一个废话。如果你想重新定位内容或者有一个更加SEO友好的网站,那么考虑使用DIVS(SEO也会遇到与屏幕阅读器相同的问题)。
A lot of it depends on whether or not you want to reposition items; also, do you want your items to be able to be read using a screen reader. Screen readers generally have a terrible time with tables because they can end up reading things out of the order you intend them to be.

It all boils down to, use the tool that's appropriate for the job. If you want to display data as in a spreadsheet, use a table - positioning divs to do this is just a nonsense. If you want to reposition content or have a site that is more SEO friendly then consider using DIVS (SEO can also suffer the same issue as screen readers).


Dalek Dave 写道:

为什么DIV比TABLE好?

Why is DIV better than TABLE?





这本身并不存在。 更适合显示表格数据。 Div s更适合在页面中创建部分。所以这是课程的马匹。





It isn't inherently. Tables are better at displaying tabular data. Divs are better at creating sections within your page. So it's horses for courses.

Dalek Dave 写道:

只是想知道为什么





这是IT中众多内战之一的主题。亲 - div 争用(以及我同意的争用)是,您可以使用CSS以任何方式轻松地为您的HTML设置外观。看看 http://www.csszengarden.com/ [ ^ ](SFW),看看几个desgins。这是应用了不同css的相同HTML。它还有助于将样式与标记分开。



也就是说,对于许多应用程序来说,表格更容易实现。



This is the subject of one of the many internicene wars in IT. The pro-div contention (and the one I agree with) is that, you can readily skin your HTML any way you want using CSS. Take a look at http://www.csszengarden.com/[^] (SFW), and look at the several desgins. This is the same HTML with different css applied. It also helps separate out the styling from the markup.

That said, for many applications tables are just simpler to implement.


这篇关于为了清楚起见,表格超过Divs ......哪个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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