读书人

为什么table里面的是黑色的字体,该如何

发布时间: 2012-05-27 05:42:30 作者: rapoo

为什么table里面的是黑色的字体

HTML code
<html>    <body>        <table border="1">           <tr>              <th>c1</th>              <th>c2</th>           </tr>           <tr align="left">        <th>c1content</th>        <th>c2content</th>       </tr>        </table>    </body></html>


我想让c1,c2是黑体,而c1content,c2content就是正常的字体就好,可是为什么现在都是黑体?

[解决办法]
HTML code
<html><head><title>表格</title> </head><body>   <table border="1">            <!-- 表格标签<table>,设定表格边框为1 -->    <tr>                    <!-- tr为行标签 -->       <th>c1</th>            <!-- td为表格头标签,默认为黑体 -->       <th>c2</th>    </tr>    <tr align="left">        <!-- tr为行标签,该行的内容为左对齐 -->        <th>c1content</th>    <!-- 这里你可以设成<td>标签,你也可以使用CSS改变内容的格式 -->         <th>c2content</th>    </tr></table></body></html> 

读书人网 >CSS

热点推荐