<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </head> <body> <!--宽度50%占比,边框粗细“1”--> <table width="50%" border="1"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <!--平行排列方式 靠左 靠右 居中 伸展 将内容对准指定字符--> <!-- <td align="left|right|center|justify|char"> --> <td align="left">$100</td> </tr> </table> <!--添加空行--> <br/> <!--加粗--> <p><b>注意:</b> HTML5 不支持 align 属性,可以使用 CSS 代替。</p> </body> </html>
代码来源:https://www.runoob.com