0% found this document useful (0 votes)
11 views2 pages

Table

table program
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Table

table program
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Aim: build a webpage illustrating the use of HTML tables for

organizing data. Exploring the table attributes for modifying cell


spacing.
Algorithm:
Step 1: start
Step 2: create HTML element
Step 3: define <head> section
Step 4: define <tittle> as “HTML table”
Step 5: create <body> element
Step 6: add <h1> heading with text
Step 7: add <h2> heading
Step 8: create <table> element with attribute
Step 9: Create Table with Modified Cell Spacing
Step 9:Define table rows (<tr>) and columns (<th>, <td>) with
data (same as Step 3)
Step 10: Define table rows (<tr>) and columns (<th>, <td>) with
data and alignment attributes:
- <th> elements with align attributes ("left", "center", "right")
- <td> elements with align attributes ("left", "center", "right")
Step 11: Close <body> element.
Step 12: Close <html> element.
Step 13 : stop

Source code:
<html>
<head>
<tittle> HTML table </tittle>
</head>
<body>
<h1 align ="center"> Student Information</h1>
<h2 align ="center"> Default Table</h2>
<table border ="1" cellpadding="10" cellspacing="5"align
="center">
<tr>
<th align="left"> Name </th>
<th align ="center"> age </th>
<th align="right"> Grade </th>
</tr>
<tr>
<th align="left"> john doe</th>
<th align ="center"> 17 </th>
<th align="right"> A+ </th>
</tr>
<tr>
<th align="left"> jane smith </th>
<th align ="center"> 18 </th>
<th align="right"> B+</th>
</tr>
<tr>
<th align="left"> Joslin </th>
<th align ="center"> 19 </th>
<th align="right"> D+ </th>
</tr>
</table>
</body>
</html>

You might also like