Html Code For Table - 1

A Sample Structure of an HTML Code for Table you can learn from

In the earlier days of the internet, all web pages were manually written and published over the internet through a web browser. Html represents the markup language for publishing webpages over the internet. Though today’s webpages easily designed by just clicking a visual program to get your web pages done in no time, the underlying program still has the complete HTML code embedded.

The open and closing tag of an HTML code

To every HTML code, there is an opening and a closing a tag except in some few cases where there may not be a need to add a closing tag. For the regular codes, exclusion in any of the pair will cause the resulting display to appear abnormal.

A sample structure of an html code for a table:

If you are going to have an html code for a table done, here is a sample structure of what it should look like:

<!DOCTYPE html>

<table>

<tr>

< th>…</th>

<th>… </th>

</tr>

<tr>

<td>…. </td>

<td>… </td>

</tr>

<tr>

<td> …</td>

<td>…. </td>

</tr>

</table>

</html>

The html table code explained

First, you will notice that fore every open tag, there is a corresponding closing tag.

From the structure of a typical html code, the DOCTYPE states the document type declaration. Here, the document type is communicated to the browser as an html document. The closing tag is what you have as the last part of the code. What follows is the introduction of the table tag to begin a table code.

Following is the heading tag. You have two headings here which would occupy two columns. This means that you would have two table data (td) in the preceding inputs that would come next.

Now, the first table data set would form the data in the first row of the table heading, that is, each for a column. The next table data would go accordingly into the second row and underneath the columns.  The table closing tag and the HTML closing tag completes the structure of the HTML code for table.

 

81 queries 0.125