본문 바로가기
대학원 공부/programming language

HTML : Table

by 월곡동로봇팔 2020. 5. 10.

HTML Table

<!DOCTYPE html>
<html>
<body>

<h2>Basic HTML Table</h2>

<table style="width:100%">
  <caption> Test </caption>
  <tr>
    <th>Firstname</th>
    <th>Lastname</th> 
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
  <tr>
    <td>John</td>
    <td>Doe</td>
    <td>80</td>
  </tr>
</table>

</body>
</html>

Tag : Description

<table> Defines a table
<th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell in a table
<caption> Defines a table caption
<colgroup> Specifies a group of one or more columns in a table for formatting
<col> Specifies column properties for each column within a <colgroup> element
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table

'대학원 공부 > programming language' 카테고리의 다른 글

HTML : tag reference  (0) 2020.05.10
HTML : Entity  (0) 2020.05.10
HTML : string formatting  (0) 2020.05.10
HTML : HTML Attribute  (0) 2020.05.10
HTML : form  (0) 2020.05.10

댓글