HTML學習筆記05

來源:互聯網
上載者:User

標籤:style   color   width   strong   c   html   

一、HTML映像

1、在HTML中,映像由<img>標籤定義。

<img src="url"/>

url指儲存映像的位置。

2、alt替換文字屬性

<img src="1.gif" alt="figure one"/>

alt屬性用來為映像定義一串預備的可替換的文本。

二、HTML表格

1、在HTML,表格由<table>標籤來定義。

每個表格均有若干行(由 <tr> 標籤定義),每行被分割為若干儲存格(由 <td> 標籤定義)。

字母 td 指表格式資料(table data),即資料儲存格的內容。資料儲存格可以包含文本、圖片、列表、段落、表單、水平線、表格等等。

<table border="1">

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>

 

2、邊框屬性border

使用邊框屬性可以顯示一個帶有邊框的表格,如上代碼所示。

3、表頭<th>

表格的表頭使用 <th> 標籤進行定義。

<table border="1">

<tr>

<th>Heading</th>

<th>Another Heading</th>

</tr>

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>

 

4、空儲存格

沒有內容的表格單元有時候無法顯示邊框,可以添加一個空格預留位置。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.