2.HTML 表格,2.html表格

來源:互聯網
上載者:User

2.HTML 表格,2.html表格

1.表格代碼:

<table></table> // 定義表格<tr></tr>   //定義行<td></td> //定義列<th></th> // 定義標題

資料儲存格可以包含文本、圖片、列表、段落、表單、水平線、表格等等。

2.如果不定義邊框屬性,表格將不顯示邊框。有時這很有用,但是大多數時候,我們希望顯示邊框:

<table border="1"></table>

3.表格表頭,通常會顯示為黑體置中的效果:

<th></th>

4.表格標題:

<table><caption>Welcome</caption></table>

5.表格的跨行和跨列:

<tr colspan="2"></tr>  //跨兩行<td rowspan="2"></td> // 跨兩列

6.表格儲存格內距:

<table cellspadding="0"></table>

7.表格儲存格邊距:

<table cellspacing="0"></table>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.