首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

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

2012-05-27 
为什么table里面的是黑色的字体HTML codehtmlbodytable border1trthc1/ththc2/th/tr

为什么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> 

热点排行