Html table notes

tables:
<table> tag:
rows <tr> each row is devided into data cells(with <td>tag). td stands for "table data", and holds the content of a data cell. A <td> can contain text, links, images, lists, forms, other tables, etc.
<table border="1">
---if you don't specify border, the table will be displayed without borders. default no border.
---Another attribute is that we use header.
table must have the header in the first line. So we need to add the header to the table. The tag is <th> just remeber.
---Also about the header: if you need the vertical headers, so you should just list the <th>and<td>. Horizontal headers, list them in another way.
---Table caption
ex:<table border="1">
   <caption>student info</caption>
   <...
---Ok, when you just operate an table, you must remeber the row <tr>, then the header <th>, and then the data <td>.alway!!! Of course, you can't forget to add <caption> following <table>
---We can also set the cellpadding.
Use this tag:
<table border="1" cellpadding="10">
----------------------------------------------------------
Ok, the last thing is to distinguish the <cellpadding> or <cellspacing>
One is how to use cellpadding to create more white space between the cell content and its borders.

Another is how to use cellspacing to increase the distance between the cells.

As to table color, we can use another way to do it.

<colgroup>tag.


-------------------------------------------------------------------------------------

Other tags: thead, tfoot, tbody

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值