Create Simple Table in HTML
Table is the two dimensional matrix used to represent data in an organize way. Table is the combination of Rows and columns and their intersection point is called cell. The number of cells can be easily determined by multiplying number of table rows with columns. For example, a table with 3 rows and 2 columns has 6 cells and each cell may contain any data such as number, characters, symbols and pictures.
In this tutorial we will learn how to create table in HTML using table tags. Our strategy is to keep things simple and easy, so we have plans to create multiple tutorials to cover the topics of HTML tables.
I would like to define the table tags before writing any HTML code for creating tables.
<Table>…</Table> everything within these tags represent table.
<TR> </TR>… TR defines a single row in a table.
<TD></TD>… TD defines a single cell or column in a table.
We will be focusing on these take in this example. More tags will be discussed in our next tutorials. Let’s create a 3 rows X 2 columns table using the HTML table tags.
7: It’s a simple table with 6 cells; you will be not able to see the table borders because we are not
currently using the border table attribute in this example.
11: Row 1, Column 1
14: Row 1. Column 2
19: Row 2, Column 1
22: Row 2. Column 2
27: Row 3, Column 1
30: Row 3. Column 2
Now you need to save the file in .htm or .html format and open it in any browser to view the below output.