Home > Web Front-end > HTML Tutorial > Why is the font in the table black_html/css_WEB-ITnose

Why is the font in the table black_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:09:26
Original
1287 people have browsed it

<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>
Copy after login


I want c1 and c2 to be bold, and c1content, c2content to be normal fonts, but why are they all bold now?


Reply to discussion (solution)

c2contentChange to td
c2content

The font in th is bold by default

<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>
Copy after login

c1< /font>

Sir, you can learn from this website
http://w3school.com.cn/html/html_tables.asp

c2content changed to td
c2content

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template