怎么使html表格中的文字跟下面一样?
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 13:15:54
怎么使html表格中的文字跟下面一样?
古语
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
在每一格中的样子都这样
这个用CSS样式进行控制就可以了.定义如下CSS样式:<style>
table p{text-indent:2em;}
table h3{text-align:center; }
</style>
下面给个完整的示例:<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<style>
table p{text-indent:2em;}
table h3{text-align:center; }
</style>
</head>
<body>
<table border="1" width="50%">
<tr>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
</tr>
<tr>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
</tr>
</table>
</body>
</html>
table p{text-indent:2em;}
table h3{text-align:center; }
</style>
下面给个完整的示例:<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<style>
table p{text-indent:2em;}
table h3{text-align:center; }
</style>
</head>
<body>
<table border="1" width="50%">
<tr>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
</tr>
<tr>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
<td>
<h3>标题</h3>
<p>
就回家哈哈哈哈哈哈哈哈反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复看见奶奶奶奶奶奶就将计就计你你你你你你你你你你你你你你你.
</p>
</td>
</tr>
</table>
</body>
</html>