Google 图片搜索输出中显示的图片缩略图是 <div> 而不是 <table>,为什么?

Picture thumbnail shown in Google image search output is <div> not <table>, why?

我一直在使用 codecademy.com

学习 HTML+CSS

一开始就讲过,如何以grid/tables的方式排列图片。这是通过使用 <table><tr><td> 标签完成的。

您必须将 <a><img src =""> 放在 <td> 标签中。

但我今天注意到 images.google.com(搜索藜麦)在表格中没有显示图片。

每个缩略图都有 <div>。为什么?

  1. 它是否让一切看起来都更快,即 divs 比 tds 快?
  2. 现在没有人再使用表格了。难以阅读,管理 HTML 代码?
  3. 还有其他编码策略吗?

这基本上归结为偏好。使用 table 进行数据布局被认为已经过时。为此使用 table - 实际表格。对于布局和此类任务,请考虑从现在开始切换到 div 标签。它有很多优点,也是互联网上广泛讨论的话题。

  1. Web Development Case Study: Upgrading Tables to Divs
  2. Why use Div tags instead of tables?
  3. <div> element instead of <table>?