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>
。为什么?
- 它是否让一切看起来都更快,即
div
s 比 td
s 快?
- 现在没有人再使用表格了。难以阅读,管理 HTML 代码?
- 还有其他编码策略吗?
这基本上归结为偏好。使用 table
进行数据布局被认为已经过时。为此使用 table
- 实际表格。对于布局和此类任务,请考虑从现在开始切换到 div
标签。它有很多优点,也是互联网上广泛讨论的话题。
- Web Development Case Study: Upgrading Tables to Divs
- Why use Div tags instead of tables?
<div>
element instead of <table>
?
我一直在使用 codecademy.com
学习 HTML+CSS一开始就讲过,如何以grid/tables的方式排列图片。这是通过使用 <table>
、<tr>
、<td>
标签完成的。
您必须将 <a>
和 <img src ="">
放在 <td>
标签中。
但我今天注意到 images.google.com(搜索藜麦)在表格中没有显示图片。
每个缩略图都有 <div>
。为什么?
- 它是否让一切看起来都更快,即
div
s 比td
s 快? - 现在没有人再使用表格了。难以阅读,管理 HTML 代码?
- 还有其他编码策略吗?
这基本上归结为偏好。使用 table
进行数据布局被认为已经过时。为此使用 table
- 实际表格。对于布局和此类任务,请考虑从现在开始切换到 div
标签。它有很多优点,也是互联网上广泛讨论的话题。
- Web Development Case Study: Upgrading Tables to Divs
- Why use Div tags instead of tables?
<div>
element instead of<table>
?