Creating a table in HTML is fairly straight forward. We have to only provide the data. It is the task of the Client-side web browser to determine how to represent these data items to the user.

The following are some simple tips while working with tables

i) Remember that table data can consist of lists, images, forms and other elements. The TD is a true container that can hold another HTML element even more tables.

ii) The TH element is typically rendered as bold text.

iii) The TD element is typically rendered as regular weight text.

Attributes ;

- Center/left/right
- Justify
- Border
- Cellpadding
- Cellspacing 
- height/Width
- Colspan
- No wrap
- Rowspan
- Valign

HTML CODE 

<!DOCTYPE html>
<html>
<head>
<title> TABLE IN HTML</title>

<style type="text/css">

table,th,td {border: 3px solid black;
border-collapse: collapse;
padding: 10px;
text-align: center;}

table {width: 760px;
margin: 25px;
background-color: orange;}

</style>
</head>

<body>

<table>
<caption><h3> <u>Student details</u></h3></caption>

<tr>
<th>Name</th>
<th>Class</th>
<th>Roll No</th>
<th>Subject</th>
<th>Section</th>

</tr>
<tr>
<td>Aman</td>
<td>10th</td>
<td>12</td>
<td>Maths</td>
<td>A</td>

</tr>
<tr>
<td>Rohit</td>
<td>11th</td>
<td>02</td>
<td>English</td>
<td>A</td>

</tr>
<tr>
<td>Neha</td>
<td>10th</td>
<td>54</td>
<td>Chemistry</td>
<td>B</td>

</tr>
<tr>
<td>Sneha</td>
<td>12th</td>
<td>03</td>
<td>Hindi</td>
<td>D</td>

</tr>


</table>

</body>

</html>

BROWSER VIEW

https://abhisharmaofficial.blogspot.com/

Your feedback is important for us :)