Home | | Internet Programming | HTML Tables

Chapter: Web or internet Programming : Scripting Elements

HTML Tables

If you do not specify a border attribute, the table will be displayed without borders.

Tables

       Tables are defined with the <table> tag.

 

       A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc.

 

Border Attribute

 

       If you do not specify a border attribute, the table will be displayed without borders. Sometimes this can be useful, but most of the time, we want the borders to show.

       To display a table with borders, specify the border attribute:

<table border="1">

 

Table Headers

Header information in a table is defined with the <th> tag.

 

Example:

 

<table border="1">

<tr>

 

<th>Header 1</th>

<th>Header 2</th> </tr>

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

 

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>




Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Web or internet Programming : Scripting Elements : HTML Tables |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.