<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> table{ width: 800px; height: 50px; border: 1px solid black; } tr,td,th{ width: 800px; height : 50px ; border : 1px Solid Black ; text-align = left : Center ; } / * remove a tag underlined * / a { text-Decoration : none ; } .bg { background : Yellow ; } </ style > </ head > < body > <-! create a table When writing table tag must have the line tr: row labels, t representatives table, r represents a row, so that the table row tr tag, referred to as row labels table cellpadding = "0px": the spacing between the tables and table settings -> < the Table cellpadding = "0px" > <-! TR: create a line -> < TR > <-! Create columns th: Header, t is the table means, h is the meaning of the header so th tag header table together is referred to as header tags. --> <th>姓名</th> <th>性别</th> <th>年龄</th> </tr> <tr class="bg"> <td><a href="#">柳言</a></td> <td>女</td> <td>28</td> </tr> <tr> <td>柳瑞</td> <td>男</td> <td>25</td> </tr> <tr> <td>柳瑞瑞</td> <td>男</td> <td>35</td> </tr> <tr> <td>周忠杰</td> <td>男</td> <td>55</td> </tr> </table> </body> </html>
Display effects: