1.markdown 语法
用markdown 做一个表格
id | name | age | sex | iphone |
---|---|---|---|---|
1 | 唐僧 | 35 | 男 | 13008888000 |
2 | 悟空 | 32 | 男 | 13008888001 |
3 | 嫦娥 | 18 | 女 | 13008888002 |
4 | 猪刚烈 | 48 | 男 | 13008888003 |
2.emmet 语法
用emmet 建立一个5行8列的表格
table>caption{title}>(thead>tr>th{title$}8)+(tobody>tr5>td(item$)*8)
<style>
table{
border-collapse:collapse;
border:1px solid #000;
}
table th,table td{
border: 1px solid #000;
padding: 5px;;
}
table th{
background-color: aqua;
}
</style>
<body>
<table>
<caption>作业:创建一个5行8列的表格
<thead>
<tr>
<th>title1</th>
<th>title2</th>
<th>title3</th>
<th>title4</th>
<th>title5</th>
<th>title6</th>
<th>title7</th>
<th>title8</th>
</tr>
</thead>
<tbody>
<tr>
<td>item1</td>
<td>item2</td>
<td>item3</td>
<td>item4</td>
<td>item5</td>
<td>item6</td>
<td>item7</td>
<td>item8</td>
</tr>
<tr>
<td>item1</td>
<td>item2</td>
<td>item3</td>
<td>item4</td>
<td>item5</td>
<td>item6</td>
<td>item7</td>
<td>item8</td>
</tr>
<tr>
<td>item1</td>
<td>item2</td>
<td>item3</td>
<td>item4</td>
<td>item5</td>
<td>item6</td>
<td>item7</td>
<td>item8</td>
</tr>
<tr>
<td>item1</td>
<td>item2</td>
<td>item3</td>
<td>item4</td>
<td>item5</td>
<td>item6</td>
<td>item7</td>
<td>item8</td>
</tr>
<tr>
<td>item1</td>
<td>item2</td>
<td>item3</td>
<td>item4</td>
<td>item5</td>
<td>item6</td>
<td>item7</td>
<td>item8</td>
</tr>
</tbody>
</caption>
</table>
</body>