
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions
GATE
GMAT
CBSE
NCERT
Career
Interview
Railway
UPSC
NID
NIFT-UG
NIFT-PG
PHP
AJAX
JavaScript
Node Js
Shell Script
Research
How to use tables in my html program?
how to use tables effectively in my html program
An HTML table is defined with the
<table>
tag.Each table row is defined with the
<tr>
tag. A table header is defined with the<th>
tag. By default, table headings are bold and centered. A table data/cell is defined with the<td>
tag.Example
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Note: The
<td>
elements are the data containers of the table.They can contain all sorts of HTML elements; text, images, lists, other tables, etc.
HTML Table - Adding a Border
If you do not specify a border for the table, it will be displayed without borders.
A border is set using the CSS
border
property:Example
border: 1px solid black;
}
Remember to define borders for both the table and the table cells.
HTML Table - Collapsed Borders
If you want the borders to collapse into one border, add the CSS
border-collapse
property:Example
border: 1px solid black;
border-collapse: collapse;
}
You might like this video:Network and IP Address Watch more here
Watch more videos from this user Here
Learn how to upload a video over here
HTML tables used to arrange data like text, images, links, other tables, etc. into rows and columns of cells.
They are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells.
A table row can also be divided into table headings with the <th> tag.
If you do not specify a border for the table, it will be displayed without borders.
A border can be added using the border attribute:
Example
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
There are two attribiutes called cellpadding and cellspacing which you will use to adjust the white space in your table cells. The cellspacing attribute defines the width of the border, while cellpadding represents the distance between cell borders and the content within a cell.
You might like this video:Network and IP Address Watch more here
Watch more videos from this user Here
Learn how to upload a video over here
We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.
You can also contribute to our vision of "Helping student to pass any exams" with these. Answer a question: You can answer the questions not yet answered in eduladder.How to answer a question Career: Work or do your internship with us.Work with us Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.How to upload a video on eduladder