- 今天努力写了很多,在不断学习,不断进步,各位也要加油呀!
<p>7.2从不同地方插入图片(文件夹或者网站地址上)</p>
<img src="ILY.gif" alt="ILY" width="300" height="200" />
<img src="//www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt="baiduLOGO" width="300" height="200"/>
<h1>8、表格</h1>
<p>8.1几行几列:table:tr开始每一行,td开始每行的数据</p>
<p>有框的table</p>
<table border="2">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>700</td>
<td>800</td>
<td>900</td>
</tr>
</table>
<table border="20">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>700</td>
<td>800</td>
<td>900</td>
</tr>
</table>
<p>没框的table</p>
<table>
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>700</td>
<td>800</td>
<td>900</td>
</tr>
</table>
<p>水平标题的表格</p>
<table border="1">
<tr>
<th>NAME</th>
<th>Telephone</th>
<th colspan="2">address</th>
</tr>
<tr>
<td>danny</td>
<td>12345</td>
<td>China</td>
<td>UK</td>
</tr>
</table>
<p>竖直标题的表格</p>
<table border="1">
<tr>
<th>Name</th>
<td>Jenny</td>
<td>LiMing</td>
</tr>
<tr>
<th>age</th>
<td>13</td>
<td>14</td>
</tr>
<tr>
<th>address</th>
<td>China</td>
<td>China</td>
</tr>
<tr>
<th rowspan="2">specialty</th>
<td>sing</td>
<!-- <td>dance</td> -->
</tr>
<tr>
<td>dance</td>
</tr>
</table>
<p>8.2总结:跨行/列的表格单元格:占两行用rowspan,需要重启tr一行填满内容;占两列用colspan,直接多加一个td就可以了</p>
<p>8.3有标签的表格,单元格边距cellpadding(是四周的)设为20,单元格间距cellspacing为12</p>
<table border="5" cellpadding="20" cellspacing="12">
<tr>
<td>
<p>This is a label.</p>
<p>This is the second label.</p>
</td>
<td>Here is a table.
<!-- <p></p> -->
<table border="1">
<tr>
<td>q</td>
<td>p</td>
</tr>
<td>a</td>
<td>b</td>
</table>
</td>
</tr>
<tr>
<td>这个单元格包含一个列表(注意:列表的元素ul和li都在td内部!!)
<ul>
<li>apple</li>
<li>banana</li>
<li>strawberry</li>
</ul>
</td>
<td>This is the fourth square.</td>
</tr>
</table>
源码会上传在同名资源里,喜欢(看到)的小伙伴点点关注,点点赞啊,给努力的小丸子(卑微的小丸子)一点鼓励~