SQL For Beginner

Saturday, July 14, 2018

Create table using HTML

Today we are going to look at creating a table using HTML.


Its a quick and easy way for your users to understand the data you are displaying. Tables are made up with data that contain rows and columns.

Now there are four central elements to use when creating a table,
  • <table>    everything is embedded inside of this.
  • <tr>         which identifies it as a row.
  • <td>         which contains the actual data.
  • <th>         which identifies it as a column.

Let's go through all of these and know how to use it,

1) First create a table element <table> and then set up the column's using <tr> element.

2) Then create the columns using <th> tag. Put inside heading's of the column's.

Add caption

3) Create some data to put in those columns, again use table row tag <tr> and now we are going to use <td> tag to hold our data. Add some more data,

Table in HTML


































Let's save this and open the web page and here you will notice that the columns heading are put in bold by HTML and the tables are not in bold.



No comments:

Post a Comment