简体   繁体   English

是否应该不惜任何代价在HTML中避免使用表格?

[英]Should Tables be avoided in HTML at any cost?

It is advisable to use tables in HTML pages (now that we have CSS)? 建议在HTML页面中使用表格(现在我们有CSS)?

What are the applications of tables? 表的应用是什么? What features/abilities does tables have that are not in CSS? 表中有哪些功能/能力不在CSS中?

Related Questions 相关问题

No - not at all. 一点都不。 But use tables for tabular data. 但是使用表格来表格数据。 Just don't use them for general layouting. 只是不要将它们用于一般布局。

But if you display tabular data, like results or maybe even a form, go ahead and use tables! 但是,如果您显示表格数据,如结果或甚至表格,请继续使用表格!

I guess I'm not in the majority here, but I still see a lot of use for tables in HTML. 我想我在这里并不占多数,但我仍然看到HTML中的表格有很多用处。 Of course, yes, for things like forms, you simply can't beat a table. 当然,是的,对于形式之类的东西,你根本无法击败一张桌子。 Trying to line up the labels and accompanying form fields would certainly be possible using DIV's, but what a PITA that would be, and resizing the page would be ugly in some cases. 尝试排列标签和随附的表单字段肯定可以使用DIV,但在某些情况下,PITA会是什么样的,并且调整页面大小会很难看。 A table works wonders here. 一张桌子在这里创造奇迹。

But also consider larger issues. 但也要考虑更大的问题。 For example, have you tried to create a standard 3 column layout with header and footer using only DIV's and CSS? 例如,您是否尝试仅使用DIV和CSS创建带有页眉和页脚的标准3列布局? Again, it is very possible, and there are about 1000 websites with examples, but they all tend to suffer from the same problems. 同样,这是非常可能的,并且有大约1000个网站的例子,但他们都倾向于遭受同样的问题。 The first problem is that the columns never really like to all become the same height without some sort of javascript assistance. 第一个问题是,在没有某种javascript帮助的情况下,列永远不会真正想要变成相同的高度。 The second problem is changing the layout is often a tricky thing, because it is a bit of a balacing act to get everything "just right" to begin with, so then you don't want to mess with it. 第二个问题是改变布局往往是一个棘手的事情,因为它是一个balacing行为,以使一切“恰到好处”开始,所以那么你不想搞砸它。 Finally, and this goes back to that last point - it ain't easy. 最后,这可以追溯到最后一点 - 这并不容易。 You have to lay out all your DIV's, then go back and create the magic CSS that force those DIV's into the proper position, and then spend a few hours tweaking it until it is right.... ugh. 你必须布置你所有的DIV,然后回去创建魔法CSS,迫使那些DIV进入正确的位置,然后花几个小时调整它直到它是正确的....呃。 And then looking at the HTML without a viewer really gives you NO idea what the page looks like because it is ALL reinterpreted by the CSS in the end. 然后在没有查看器的情况下查看HTML确实不会让您知道页面的样子,因为它最终会被CSS重新解释。

Now, option B. Use a table. 现在,选项B.使用表格。 Spend about 30 seconds typing out the <tr> and <td> tags, probably no CSS at all, no javascript 'fixit', and know EXACTLY what it will look like just by looking at the HTML. 花大约30秒输入<tr>和<td>标签,可能根本没有CSS,没有javascript'fixit',并且只是通过查看HTML就能确切地知道它会是什么样子。

Certainly there are arguments for and against tables, and purists seem to favor DIV's for layout, but don't use DIV's for religious reasons just because someone told you tables are evil. 肯定有支持和反对表的论据,纯粹主义者似乎赞成DIV的布局,但不要因为宗教原因而使用DIV,因为有人告诉你桌子是邪恶的。 Use what works best for you, your page, and the way your viewers are going to interact with the page. 使用最适合您的方式,页面以及查看者与页面交互的方式。 If that's a table, then use it. 如果那是一张桌子,那就用吧。 If not, don't. 如果没有,不要。

Everyone so far has said how tables should only be used for tabular data, and this is true. 到目前为止,每个人都说过表格应该只用于表格数据,这是事实。 Take a look at the HTML source of any page on SO and you'll see that they have a different idea... 看看SO上任何页面的HTML源代码,你会发现他们有不同的想法......

I think their rationale is that sometimes using a table is just so much simpler. 我认为他们的理由是, 有时使用表格会简单得多。 Though, there are a lot of really good usability reasons why to avoid them. 虽然,有很多非常好的可用性原因,为什么要避免它们。

Other than for tabular data , tables are unfortunately still necessary if you want to create flexible grid layouts such as complex forms in a cross-browser compatible manner. 除了表格数据之外 ,如果您希望以跨浏览器兼容的方式创建灵活的网格布局(如复杂表单),则表格仍然是必需的。

CSS2 has support for creating flexible grid layouts without using the table element via the display property , but this is not supported in IE6 or IE7 . CSS2支持创建灵活的网格布局,而无需通过display属性使用table元素,但IE6或IE7不支持此功能。

However, for most basic form layouts, CSS should be sufficient. 但是,对于大多数基本表单布局,CSS应该足够了。

If only the CSS equivalent was as expedient in setting up a "table-like" layout, then I would love to use CSS. 如果只有CSS等价物就像设置“表格式”布局一样方便,那么我很乐意使用CSS。 I find the time that it takes to mimic the things that others have listed here (equal heights on cells, auto-growing rows, etc.) is simply not worth the effort. 我发现模仿其他人在这里列出的东西所需的时间(单元格上的高度,自动增长的行等等)根本不值得努力。 I don't get a return on my investment as opposed to quickly throwing together a table in most cases. 我不会得到我的投资回报,而不是在大多数情况下快速抛出一张桌子。

All browsers can agree on exactly how a table should be laid out. 所有浏览器都可以确切地就如何布置表格达成一致。 Bam. 巴姆。 Done. 完成。

Here's how my CSS follies usually go: Try setting up a table-like layout in CSS. 以下是我的CSS愚蠢行为:尝试在CSS中设置类似于表格的布局。 Spend 20 minutes or more getting everything just so in Mozilla and then open it up in IE. 花20分钟或更长时间在Mozilla中获取所有内容,然后在IE中打开它。 Spend another 30 minutes tweaking between those two browsers. 在这两个浏览器之间再花30分钟调整一下。 Pretend like there are only two browsers in the world because I actually need to get some work done. 假装世界上只有两个浏览器,因为我实际上需要完成一些工作。

I believe in the promise of CSS: Separation of concerns. 我相信CSS的承诺:关注点的分离。 The problem is that for those who need to be productive, CSS is not ready for prime time. 问题是,对于那些需要高效工作的人来说,CSS还没有准备好迎接黄金时段。 Or perhaps it's the rendering engines of the browsers - whichever. 或许它是浏览器的渲染引擎 - 无论哪个。

The benefit of CSS is that it separates design and layout from content. CSS的好处是它将设计和布局与内容分开。

If you have tabular data then it makes sense to use a <TABLE> tag. 如果您有表格数据,那么使用<TABLE>标记是有意义的。 If you want to layout different blocks of content then you should use <DIV> or <SPAN> and CSS. 如果要布局不同的内容块,则应使用<DIV><SPAN>和CSS。

Scanning over these answers, I didn't see one real-world reason where tables are necessary for layout and that is html emails. 扫描这些答案,我没有看到一个真实的原因,表格是布局所必需的,那就是HTML电子邮件。

I work for a very, very large financial company and we track around 600 different jobs a month....many of which are multiple email campaigns. 我在一家非常大的金融公司工作,我们每个月跟踪大约600个不同的工作......其中许多是多个电子邮件活动。

You cannot use css for layout for any mail reader. 您不能将css用于任何邮件阅读器的布局。 There are a few inline css specs you can use that relate to color, font face and size and even line-height is fairly widely available but for layout, you have to use tables as all the major and most minor email readers (Outlook 97/03, Entourage, MSN etc) read them just fine. 你可以使用一些与颜色,字体和大小相关的内联css规范,甚至行高也相当广泛,但对于布局,你必须使用表作为所有主要和最小的电子邮件阅读器(Outlook 97 / 03,随行人员,MSN等)读完就好了。

The issues with tables come into play when you have td's that do not have height/width specified whether they contain data or not. 当你没有指定高度/宽度的td是否包含数据时,表的问题就会发挥作用。 So, 'broken' table layouts are usually fixed by paying attention to attributes and yes... whitespace in the html....yes whitespace that isn't supposed to matter. 所以,“破碎的”表格布局通常是通过关注属性来修复的,是的......是html中的空白......是的空白是不重要的。

So, if you ever work for a large company/corporation or you land a very large client, be ready to throw all the current technology out the door and get your html table hat on! 所以,如果你曾经为一家大公司/公司工作,或者你找到了一个非常大的客户,那么就准备好把所有现有的技术都拿出来,然后把你的html桌子挂上!

Tables are for outputting tabular data. 表用于输出表格数据。 Anything that you might display in a spreadsheet, columns of results, that kind of thing. 您可能在电子表格中显示的任何内容,结果列,此类内容。

The suggestion of using CSS rather than tables is for columnar layouts, which weren't really actual tables. 使用CSS而不是表的建议是用于柱状布局,而不是真正的实际表格。 It was never intended to suggest that tables should be removed completely. 它从来没有打算建议应该完全删除表。

Tables have no equivalent in CSS2, and they aren't that easy to duplicate using css. 表在CSS2中没有等价物,并且使用css并不容易复制。 The particular part of tables that is hard to reproduce is the auto-sizing of the columns. 难以重现的表的特定部分是列的自动调整大小。 While it's easy to let the 1 row grow to the same size across the page, it's hard for the next row to match up the column size or each cell size dynamically, and in fact can't be done without using other scripting languages such as javascript, php or others. 虽然很容易让1行在整个页面上增长到相同的大小,但是下一行很难动态地匹配列大小或每个单元格大小,事实上如果不使用其他脚本语言(如javascript,php或其他。 You can use max and min widths, as well as set percentages for cell sizes, or hard code cell width's, but dynamically growing cells work fine for 1 row, it's the next row below it that won't match up. 您可以使用最大和最小宽度,以及设置单元格大小或硬代码单元格宽度的百分比,但动态增长的单元格可以正常工作1行,它是下面的下一行不匹配。

I think it all depends on time/effort. 我认为这完全取决于时间/精力。 While a purist might say "only use tables for tabular data," I've used tables to ease cross-browser layouts in the past. 虽然纯粹主义者可能会说“只使用表格来表格数据”,但过去我使用表格来简化跨浏览器布局。

For me, it's matter of time utilization. 对我来说,这是时间利用的问题。 I can either spend my time cranking away on the CSS to get it right or I can toss it in a table and spend far less time on it. 我可以把时间花在CSS上以使其正确,或者我可以将它扔在桌子上并花费更少的时间在它上面。 I tend to go this route until things are up and running. 事情已经开始并且正在运行,我倾向于走这条路。 Once the functionality is there, I go back and polish the CSS/HTML. 一旦功能出现,我就会回顾并优化CSS / HTML。

I have to go with the tables approach here. 我必须在这里采用表格方法。 The reason for this comes simply down to cost. 其原因仅限于成本。 Until a well supported CSS-centric approach to layout comes out, and I am talking about at the macro level...not micro within containers, trying to shoehorn CSS positioning into a generalized approach to layout is inefficient. 直到一个受到良好支持的以CSS为中心的布局方法出来,我在宏观层面上讨论...而不是在容器内微观,试图将CSS定位成为一种通用的布局方法是低效的。 You have to approach this from the perspective of the person writing the check for the development. 你必须从编写开发支票的人的角度来处理这个问题。

A few years ago I contracted to develop and maintain a site for a major hotel chain. 几年前,我签约开发并维护一家大型连锁酒店的网站。 We went with a table driven layout; 我们采用了桌面驱动布局; your basic header, body, footer with left/right columns. 你的基本标题,正文,页脚左/右列。 We also used tables for some of the finer elements like non-graphic buttons. 我们还使用表格来处理一些更精细的元素,比如非图形按钮。 The chain's parent company maintained their own site and went with a pure CSS approach to layout. 该连锁店的母公司维护着自己的网站,采用纯CSS方法进行布局。 When IE7 came out our site worked perfectly without any changes. 当IE7问世时,我们的网站完美运行,没有任何变化。 The parent company's site was a mess. 母公司的网站一团糟。 Overall they spent about 1000 total hours (between meetings/development/QA/rollout) fixing the issues. 总体而言,他们花了大约1000个小时(在会议/开发/ QA /推出之间)解决问题。

When you are paid to develop a site part of your responsibility is to mitigate against future risk and minimize future development costs, particularly if those costs do not add value to the site (your product). 当您获得开发站点的一部分时,您的责任就是减轻未来的风险并最大限度地降低未来的开发成本,特别是如果这些成本不会增加站点(您的产品)的价值。

My very simple and basic opinion on this is that tables are there for tabular data - not for positioning one thing on top or next to another element because you happen to like it being there. 我对此非常简单和基本的看法是表格存在表格数据 - 不是将一个东西放在顶部或旁边另一个元素,因为你碰巧喜欢它在那里。

So - if you want to display a table of data: do so (with a table). 所以 - 如果你想显示一个数据表:这样做(用表)。 If you want to position content on the page: use css. 如果您想在页面上定位内容:使用css。

I believe and hope the era of using tables for layout is gone. 我相信并希望使用表格进行布局的时代已经过去了。 Simply put: a table is a table, nothing else . 简单地说: 一张桌子就是一张桌子,没有别的

What I think will be the new, similar, flamewar topic for next few years is : should I use new CSS feature display : table , table-cell , table-row etc. for layout?? 我认为未来几年新的,类似的,火焰主题是:我应该使用新的CSS功能显示tabletable-celltable-row等进行布局? ? :-) :-)

I think you might be slightly confused. 我想你可能会有些困惑。 CSS is a method of styling HTML documents, whether this is a table element or a 'div'. CSS是一种样式化HTML文档的方法,无论是表格元素还是“div”。

It used to be that tables were used in HTML to design the whole page layout. 过去,在HTML中使用表格来设计整个页面布局。 It was common to see multiple nested tables (usually generated by WYSIWYG programs such as Dreamweaver), and this lead to a maintainance nightmare. 通常会看到多个嵌套表(通常由WYSIWYG程序(如Dreamweaver)生成),这会导致维护噩梦。

Since the introduction and adoption of CSS stylesheets it is now correct only to use a table for tabular data. 自CSS样式表的引入和采用以来,现在只对表格数据使用表是正确的。 That means if your data is most naturally rendered as a table use the table element. 这意味着如果您的数据最自然地呈现为表,请使用table元素。 You can still style the table using CSS. 您仍然可以使用CSS设置表格样式。

However, and I generally disapprove of this method since it duplicates existing functionality, it is possible to use elements to build a table like structure. 但是,我通常不赞成这种方法,因为它复制了现有的功能,因此可以使用元素来构建类似于结构的表。 In fact there are several website that will generate such code for you, but I have no links to hand. 事实上有几个网站会为你生成这样的代码,但我没有链接。

Remeber also that some users might be either viewing in text only mode, or using a screen reader both of which will probably break the page (like reading the columns vertically rather than horizontally) hence the proper use of tables. 还要记住,有些用户可能正在以纯文本模式查看,或者使用屏幕阅读器,这两者都可能会破坏页面(如垂直而不是水平读取列),因此正确使用表格。

HTH HTH

I think the reason this comes up so much is that using html tables is easier to understand when creating structure and layout than CSS. 我认为这个问题出现的原因是在创建结构和布局时使用html表比CSS更容易理解。 Using CSS is more abstract but helps seperate your code. 使用CSS更抽象,但有助于分离您的代码。

In response to the "structure" argument...by definition, isn't using html tables giving structure to data so that you identify it as "tabular". 响应“结构”参数......根据定义,不使用给数据结构的html表,以便将其标识为“表格”。 Whether it is CSS or html you are controlling the flow and layout of data. 无论是CSS还是h​​tml,您都在控制数据的流量和布局。 Be it tabular or otherwise... 无论是表格还是其他......

If CSS tables are so important (and I'm sure my answer will start some kind of flame war) why isn't there a mechanism in Visual Studio to create a layout using CSS? 如果CSS表非常重要(我确定我的答案会开始某种火焰战争)为什么Visual Studio中没有一种机制来使用CSS创建布局? Oh, you didn't check the layout feature thingy in VS? 哦,你没有检查VS中的布局功能吗? Yeah, you get tables, straight from Microsoft. 是的,你可以直接从微软获得表格。 I'm not complaining, just making the point that if it meant as much to the rest of the world you would see MS switch to CSS. 我并没有抱怨,只是说明如果它对世界其他地方意义重大,你会看到MS切换到CSS。

In my opinion do what fits best with your project. 在我看来,做什么最适合你的项目。 For one or two page web projects I still use html because what it does is obvious. 对于一个或两个页面的Web项目,我仍然使用html,因为它的作用是显而易见的。 Using CSS is more abstract and some mornings I just haven't had that much coffee. 使用CSS更抽象,有些早晨我没有那么多咖啡。 HTML tables can get messy, fast. HTML表格可能会变得混乱,快速。 CSS takes a little more time to get messy but will too. CSS需要更多的时间来搞乱,但也会。

Although for some layouts using tables may seem simpler at first, when maintenance time comes using css pays off. 虽然对于某些使用表格的布局起初可能看起来更简单,但是当使用css的维护时间得到回报时。 Especially if you ever want to change the position of something, or if you want to use the same layout in several places. 特别是如果你想改变某些东西的位置,或者你想在几个地方使用相同的布局。

IMHO, tables should be used only when presenting tables. 恕我直言,表格只应在展示表格时使用。 Never for layout purposes. 绝不用于布局目的。

@toddhd, advocating the use of tables for layout simply to save time is a cop out. @toddhd,提倡使用表格进行布局只是为了节省时间是一个警察。 If time is the issue, then you can quickly create a columnar layout without tables using a framework like Blueprint CSS or 960 Grid . 如果时间问题,那么您可以使用Blueprint CSS960 Grid等框架快速创建没有表的列式布局。

Seems to depend on what browsers were capable of when you started designing. 似乎取决于您开始设计时浏览器的功能。 If you began back when only tables worked then that is what you will probably always want to use, because you know it. 如果你只开始工作,那么这就是你可能总想要使用的东西,因为你知道它。 Or if that is what you liked to use even after browsers had advanced to be able to render CSS... 或者,如果这是你喜欢使用的东西,即使在浏览器已经进步以便能够渲染CSS之后......

I just don't like to keep doing the same things over and over because they are easy and I know how to do them.That is boring. 我只是不喜欢一遍又一遍地做同样的事情,因为它们很容易,我知道怎么做。这很无聊。 I would much rather learn new techniques than dismiss something because I don't know how to use it or I think I don't have time to learn. 我宁愿学习新技术而不是解雇某些东西,因为我不知道如何使用它,或者我认为我没有时间学习。

I don't like to use tables, I don't understand them, they seem alien and offensive but that is because I began in 2005. I also don't use design programs to spit out templates because I prefer hand coding. 我不喜欢使用表格,我不理解它们,它们看起来很陌生和冒犯,但那是因为我从2005年开始。我也不使用设计程序吐出模板,因为我更喜欢手工编码。

Tables are used for displaying tabular data. 表用于显示表格数据。 There's not much else to add :-D 没有什么可补充的:-D

If there is a reason for using a table in a semantic way (for example for showing tabular data) use tables. 如果有理由以语义方式使用表(例如,用于显示表格数据),请使用表。

Just use no tables to do layout stuff. 只是不使用表来做布局。 There are lot of searchengine und accessibility benefits that you get with semantic markup. 使用语义标记可以获得很多searchengine和可访问性优势。

Reserving tables for use only for tabular data works most of the time. 保留仅用于表格数据的表在大多数情况下都有效。 There are certain layout problems that are much easier to achieve with tables than anything else. 使用表格比某些更容易实现的某些布局问题。 For example, vertical alignment and equal height columns. 例如,垂直对齐和相等高度的列。 On the other side of the fence, there have been some complex data tables that I've used floated divs for because tables weren't fitting the bill. 在围栏的另一边,有一些复杂的数据表,我使用浮动div,因为表格不适合账单。

Like anything else, use the right tool for the right job, and sometimes the most pragmatic tool isn't what you think it would be. 像其他任何东西一样,使用正确的工具来做正确的工作,有时最实用的工具不是你想象的那样。 That said, I rarely use tables for layout, even in the examples I gave, because inevitably I hit some problem that makes me have to do it with CSS anyway. 也就是说,即使在我给出的示例中,我也很少使用表格进行布局,因为我不可避免地遇到了一些问题,这使得我无论如何都必须使用CSS。 Your mileage may vary. 你的旅费可能会改变。

I also don't like the idea of using tables to arrange items on a page. 我也不喜欢使用表格来排列页面上的项目。 However this should not become a religion - tables are bad. 然而,这不应该成为一种宗教 - 表格很糟糕。 I've encountered one example where I have a three column layout and needed the center column to grow with the content. 我遇到过一个例子,我有一个三列布局,需要中心列随内容增长。 In the end the solution that was the simplest and worked well on all needed browsers was to use a table. 最后,在所有需要的浏览器上最简单且运行良好的解决方案是使用表格。 IMHO CSS still has some shortcomings and sometimes it's better to use something simple that works rather than just adhere blindly to some idea ('tables are bad...'). 恕我直言CSS仍然有一些缺点,有时最好使用简单的东西,而不是盲目地坚持一些想法('表是坏...')。

you can even use them for layouting, if your layout is somewhat tabular. 如果您的布局有些表格,您甚至可以使用它们进行布局。 I like the feature of tables and cells dynamically adjusting to whatever width the browser window is. 我喜欢表和单元格的功能,动态调整到浏览器窗口的宽度。 Never use any fixed widths or height, that's just messing up things. 永远不要使用任何固定的宽度或高度,这只是搞乱事情。

It's easy. 这很简单。 Think your webpage as a real page on paper. 将您的网页视为纸上的真实页面。 You should use tables on webpage only when you would draw a table on your paper. 只有在纸上绘制表格时才应使用网页上的表格。

Another tip is to use table only with border > 0. This way, you use tables only when you mean you want a table (and not for layout). 另一个技巧是使用表只带边框> 0。这样一来,您使用表,只有当你的意思是你想有一个表(而不是布局)。

I am going to assume that your question is actually - "Should I avoid using HTML tables for layout purposes?" 我将假设您的问题实际上是 - “我应该避免使用HTML表格进行布局吗?” . The answer is: No. In fact, tables are specifically meant to be used to control layout. 答案是:不。实际上,表格专门用于控制布局。 The drawback for using tables to control the layout of an entire page is that the source file rapidly becomes difficult to manually understand and edit. 使用表来控制整个页面布局的缺点是源文件很快就难以手动理解和编辑。 A (possible) advantage of using tables to control the entire layout is if there are specific concerns about cross-browser compatibility and rendering. 使用表来控制整个布局的(可能的)优点是,是否存在跨浏览器兼容性和呈现的特定问题。 I prefer to work directly with the HTML source file, and for me using CSS makes that easier than using tables for the entire layout. 我更喜欢直接使用HTML源文件,对我来说,使用CSS比使用表格更容易。

Tables make sense only when you're trying to display tabular data and that's it. 只有在您尝试显示表格数据时,表格才有意义。 For layouts, you should always use DIVs and play with CSS positionings. 对于布局,您应该始终使用DIV并使用CSS定位。

if you need to use a table, your layout probably sucks. 如果你需要使用一个表,你的布局可能很糟糕。 Show me a single well-designed site that uses tables, and I'll show you a thousand that don't. 给我看一个精心设计的使用表格的网站,我会向你展示一千个没有表格的网站。

A lot of people are throwing around the term "purist". 很多人都在围绕“纯粹主义者”这个词。 This is rubbish. 这是垃圾。 Would you print newspaper copy in a book? 你会在一本书中打印报纸吗? Would you design a brochure with Excel? 你会用Excel设计一本小册子吗? No? 没有? Then why would you use a table to display non-tabular data? 那你为什么要用表来显示非表格数据呢?

Most times the difficulties people face in letting go of tables for layout is a result of their own ignorance of HTML/CSS/Good Design Principles. 大多数情况下,人们在放置布局表时遇到的困难是他们对HTML / CSS /优秀设计原则的无知。 While you may find it difficult to make multi-column layouts extend evenly in the vertical direction, you might think to try a different method. 虽然您可能会发现很难使多列布局在垂直方向上均匀延伸,但您可能会考虑尝试不同的方法。 DIVs are not TABLEs. DIV不是TABLE。 You can make faux columns using wide borders, page backgrounds, etc. Spend some time actually learning to do what you're setting out to do, or forever be seen as someone without any kind of useful skill. 您可以使用宽边框,页面背景等制作人造柱。花一些时间实际学会做你要做的事情,或永远被视为没有任何有用技能的人。 ( http://www.alistapart.com would be a good start) http://www.alistapart.com将是一个良好的开端)

I'm honestly surprised that this question is cropping up in 2008. DIVs came around when I was in high school. 我真的很惊讶这个问题在2008年出现了。当我在高中时,DIV就出现了。 Stop being a noob. 别再做菜鸟了。

And as was mentioned above, tables fail hard on mobile devices and screen readers. 如上所述,表格在移动设备和屏幕阅读器上都很难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM