HTML Table


* Table có border và padding

<table border="1" cellpadding="10" >
  <tr>
	<td>1</td>
	<td>2</td>
  </tr>

  <tr>
	<td>3</td>
	<td>4</td>
  </tr>

</table>
 
1 2
3 4

* Table có header (Horizontal)

<table border="1" cellpadding="10">
<tr>
  <th>Name</th>
  <th>Job</th>
</tr>
<tr>
  <td>Mr D</td>
  <td>Freelancer</td>
</tr>
<tr>
  <td>Mr J</td>
  <td>Coder</td>
</tr>

</table>

Name Job
Mr D Freelancer
Mr J Coder

* Table có header (Vertical)

<table border="1" cellpadding="10">
<tr>
  <th>Name</th>
  <td>Mr D</td>
  <td>Mr T</td>
</tr>
<tr>
  <th>Job</th>
  <td>Freelancer</td>
  <td>Web Developer</td>
</tr>

</table>

Name Mr D Mr T
Job Freelancer Web Developer

* Column Span trong Table

<table border="1" cellpadding="10">
<tr>
  <th>Name</th>
  <th colspan="2">Job</th>
</tr>
<tr>
  <td>Mr D</td>
  <td>Freelancer</td>
  <td>Instructor</td>
</tr>
</table>
Name Job
Mr D Freelancer Instructor

* Row Span trong Table

<table border="1" cellpadding="10">
<tr>
  <th>Name</th>
  <td>Mr D</td>
</tr>
<tr>
  <th rowspan="2">Job</th>
  <td>Freelancer</td>
</tr>
<tr>
  <td>Instructor</td>
</tr>

</table>
Name Mr D
Job Freelancer
Instructor

* Bài Tập

Mon Tue Wed Thu Fri Sat Sun
HTML CSS Javascript Eleventy
Swift AWS

Chúng ta thử xây dựng table như sau nhé. Chúc vui ^_^