你可以做以下的事情:
1)HTML + CSS
<!DOCTYPE html>
<html>
<head>
<style>
table
{
border-collapse: separate;
/*this is by default value of border-collapse property*/
border-spacing: 0px;
/*this will remove unneccessary white space between table cells and between table cell and table border*/
}
th,td
{
background-color: red;
padding: 5px;
}
</style>
</head>
<body>
<table>
<tr>
<td><b>Member</b></td>
<td><b>Account #</b></td>
<td><b>Site</b></td>
<td><b>Date</b></td>
</tr>
</table>
</body>
</html>
或者,
2)HTML + CSS
<!DOCTYPE html>
<html>
<head>
<style>
table
{
border-collapse: collapse;
}
th,td
{
background-color: red;
padding: 5px;
}
</style>
</head>
<body>
<table>
<tr>
<td><b>Member</b></td>
<td><b>Account #</b></td>
<td><b>Site</b></td>
<td><b>Date</b></td>
</tr>
</table>
</body>
</html>
如果您需要使所有表格條目加粗,您可以執行以下操作:
<!DOCTYPE html>
<html>
<head>
<style>
table
{
border-collapse: collapse;
}
th,td
{
background-color: red;
padding: 5px;
font-weight: bold;
}
</style>
</head>
<body>
<table>
<tr>
<td>Member</td>
<td>Account #</td>
<td>Site</td>
<td>Date</td>
</tr>
</table>
</body>
</html>
完美,謝謝。 – HerrimanCoder