Skip to main content

Inserting A Table

In this page, we'll study the purpose of a table and how is it being inserted.


What is a table?

A Table is used to organize datas or information. It has rows and columns that separates one data/information to another.


Tags of a Table

Below are the list of the tags used to insert a table:

  1. <table>
    ***
    </table>
  2. - This tag declares where will the table being inserted starts and ends.

  3. <caption>***</caption>
  4. - This tag is used to input the title of what you have on your table.

  5. <tr>***</tr>
  6. - The tag name "tr" stands for "table row".

    - This tag declares the beginning and end of a table row.

  7. <th>***</th>
  8. - The tag name "th" stands for "table heading".

    - This tag indicates the column header of your table.

  9. <td>***</td>
  10. - The tag name "td" stands for "table data".

    - This tag indicates the data that will be inputted inside the table.



Sample 1

Note: The code will be found next to the inserted sample table.

Sample Table 1
Column Heading 1 Column Heading 2 Column Heading 3
Data 1 Data 2 Data 3
Data 4 Data 5 Data 6

Noticed that datas 4, 5, and 6 were place under the datas 1, 2, and 3 respectively.


Codes used to insert the sample table above:
<table>
<caption>Sample Table 1</caption>
<tr>
<th>Column Heading 1</th>
<th>Column Heading 2</th>
<th>Column Heading 3</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
<td>Data 3</td>
</tr>
<tr>
<td>Data 4</td>
<td>Data 5</td>
<td>Data 6</td>
</tr>
</table>

Attributes of a table

The attributes listed below are just some of many that you will most likely use:


Note:



Try It

If you want to try what you have learned in this page, open a notepad and perform them.




Back to home
back to top


© CopyrightMMK 2017