1. 程式人生 > >table 設置每列的顏色

table 設置每列的顏色

pan rst float wid oat char col head 設置

ISBNTitlePrice
3476896 My first HTML $53
5869207 My first CSS $49

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title></title> 
</head>
<body>

<table border="1" clas="left">
  <colgroup
> <col style="background-color:red;width: 100px;text-align:left;"> <col style="background-color:orange"> <col style="background-color:orange"> </colgroup> <tr> <th >ISBN</th> <th>Title</th> <th>Price</th>
</tr> <tr> <td>3476896</td> <td>My first HTML</td> <td>$53</td> </tr> <tr> <td>5869207</td> <td>My first CSS</td> <td>$49</td> </tr> </table> </body>
</html>

table 設置每列的顏色