VS Code编写html(2)

<html>
<head>
<title>welcome to myspace</title>
<meta charset="utf-8">
<!--设置表格样式-->
<style>
table{border: 1px solid purple;}
/*tr{border+tab}*/
tr{border: 2px solid orange;}
th{border: 3px solid olivedrab;}
td{border: 3px solid greenyellow;}
 
</style>
<body>
<h1>建立表格</h1>
<!--ol>li*5-->
<!--ol>li{内容$}*5-->
<!--给表格添加单元格内边框-->
<table cellpadding="30">
<!--tr>th{标题$}*3+tab建立行-->
<tr>
<th>标题1</th>
<th>标题2</th>
<th>标题3</th>
</tr>
<!--tr>td{内容$}*3+tab-->
<tr>
<td>内容1</td>
<td>内容2</td>
<td>内容3</td>
</tr>
<tr>
<td>内容1</td>
<td>内容2</td>
<td>内容3</td>
</tr>
</table>
</body>
</head>
</html>
 
html的基本框架

建立的表格如下:

 

posted @ 2017-06-09 08:26  Jaoany  阅读(304)  评论(0编辑  收藏  举报