# HTML基礎教學(二) ###### tags: `HTML` # 表格 由 `<table>...</table>` 所夾住的,其中 `<tr>...</tr>` 會夾住一個列,而每個列又可以分成數個欄。 |用法|說明| |-----|----| |標頭|`<th>`| |內容|`<td>`| ``` <table> <tr> <th></th> <th>欄 1</th> </tr> <tr> <th>列 1</th> <td>1,1</td> </tr> </table> ``` <table> <tr> <th></th> <th>欄 1</th> <th>欄 2</th> </tr> <tr> <th>列 1</th> <td>1,1</td> <td>1,2</td> </tr> <tr> <th>列 2</th> <td>2, 1</td> <td>2, 2</td> </tr> </table> # 表單 |用法|說明|code| |-----|----|----| |文字輸入|輸入文字|`<form action="test.php" method="post">`| |文字輸入|輸入文字|`<input type="text">`| |密碼輸入|輸入密碼,會自動隱藏|`<input type="password">`| |多行輸入|可以輸入多行文字|`<textarea></textarea>`| |下拉選單|設定多的下拉選單的選項,每個選項給不同的值|`<select><option></option></select>`| |選項按鈕|做成一組的選項,僅能選擇其中一項|`<input type="radio">`| |核取方塊|用來製作多選項的表單|`Checkboxes <input type="checkbox">`| |選取日期|日期選擇器|`<input type="date"`| |表單按鈕|按鈕|`<button type="button">我是按鈕1</button>`| |表單按鈕|按鈕|`<input type="button" value="我是按鈕2">`| |圖片按鈕|按圖片|`<button type="button"><img src="圖片網址"></button>`| |送出資訊|基礎設定為按鈕|`<input type="submit" value="送出表單">`| ![](https://i.imgur.com/MibWpQP.png)