5. AC I-Unit 1: HTML Tables - Examples
<TD>Column 3-Bottom</TD>
</TR>
</TABLE>
6. Write HTML code to create the following table:
Column 2-A
Column 1
Column 3
Column 2-B
Source Code:
<TABLE WIDTH="650" BORDER="1" HEIGHT="300">
<TR>
<TD ROWSPAN="2" WIDTH="15%">Column 1</TD>
<TD WIDTH="70%">Column 2-A</TD>
<TD ROWSPAN="2" WIDTH="15%">Column 3</TD>
</TR>
<TR>
<TD>Column 2-B</TD>
</TR>
</TABLE>
7. Write HTML code to create the following tables:
Cell that spans two columns:
Name
Telephone
Bill Gates 555 77 854 555 77 855
Cell that spans two rows:
First Name: Bill Gates
Telephone:
555 77 854
555 77 855
Prof. Mukesh N. Tekwani {Mobile: 9869 488 356 }
Page 5 of 14
6. AC I-Unit 1: HTML Tables - Examples
8. Write HTML code to create the following table:
This is a paragraph
This cell contains a table:
AB
This is another paragraph C D
This cell contains a list
• apples
HELLO
• bananas
• pineapples
Source Code:
<TABLE BORDER="1">
<TR>
<TD>
<P>This is a paragraph</P>
<P>This is another paragraph</P>
</TD>
<TD>This cell contains a table:
<TABLE BORDER="1">
<TR>
<TD>A</TD>
<TD>B</TD>
</TR>
<TR>
<TD>C</TD>
<TD>D</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD>This cell contains a list
<UL>
<LI>apples</LI>
<LI>bananas</LI>
<LI>pineapples</LI>
</UL>
</TD>
<TD>HELLO</TD>
</TR>
</TABLE>
9. Write HTML code to create the following table:
Item 1
Page 6 of 14
Item 2
Item 3
mukeshtekwani@hotmail.com
7. AC I-Unit 1: HTML Tables - Examples
Item 4
Item 5
<TABLE BORDER = "1" width = 500>
<TR>
<TD>Item 1</TD>
<TD ROWSPAN = 2>Item 2</TD>
<TD>Item 3</TD>
</TR>
<TR>
<TD>Item 4</TD>
<TD>Item 5</TD>
</TR>
</TABLE>
10.Write HTML code to create the following table (multiple headers and
colspan):
Head1
Head2
Head 3 Head 4 Head 5 Head 6
A
B
C
D
E
F
G
H
<TABLE BORDER = 1>
<TR>
<TH COLSPAN=2>Head1</TH>
<TH COLSPAN=2>Head2</TH>
</TR>
<TR>
<TH>Head 3</TH>
<TH>Head 4</TH>
<TH>Head 5</TH>
<TH>Head 6</TH>
</TR>
<TR>
<TD>A</TD>
<TD>B</TD>
<TD>C</TD>
<TD>D</TD>
</TR>
<TR>
<TD>E</TD>
<TD>F</TD>
<TD>G</TD>
<TD>H</TD>
</TR>
</TABLE>
Prof. Mukesh N. Tekwani {Mobile: 9869 488 356 }
Page 7 of 14
8. AC I-Unit 1: HTML Tables - Examples
11.Write HTML code to create the telephone bill:
Telephone Bill
Subscriber’s Name
and Address
Leena P, Cross
Roads
Off Haji Ali Road.
Telephone
Type
no
Genl res
575077
Perm
OPENING
CLOSING
METER
METER
READING
READING
1052
1297
DETAILS
Consumer no
P.O.Stamp
PL 0051077
Bill date
Due Date
Pay By Date
01- Aug-2001
18-Aug-2001
25-Aug-2001
METERED DEBIT
CALLS CALLS
CREDIT
CALLS
FREE
CALLS
CHARGEABLE
CALLS
245
0
ITEM
150
PERIOD
10/09/97
to
31/10/98
16/05/97
to
15/07/97
16/05/97
to
15/07/97
16/05/97
to
15/07/97
95
AMOUNT
TAX
14.00
0
Rate
No. of
Calls
Charge
Rent
0.80
95
76
ITEM
10
TKP/PG
CALLS
SURCHARGE AFTER
PAY BY DATE
AMT ON/ BEFORE PAY
290
BY DATE
ITX
CALLS
AMT AFTER PAY BY
DATE
MISC
300
200.00
76.00
0.00
0.00
TOTAL
290.00
ADDRESS
PLEASE PAY BEFORE DUE DATE
AND AVOID DISCONNECTION
E & O.E. PLEASE SEE OVERLEAF FOR
CODES / INSTRUCTIONS
Accounts Officer
<html>
<head>
<title>Telephone Bill</title>
</head>
Page 8 of 14
mukeshtekwani@hotmail.com
9. AC I-Unit 1: HTML Tables - Examples
<body>
<h2>Telephone Bill</h2>
<br>
<table border="1" cellspacing="0" cellpadding="0" align = center
>
<!-- Row 1 -->
<tr>
<td width="182" colspan="3"
align="center"><b><u>Subscriber’s Name and Address</u></b></td>
<td width="131" colspan="2" align = "center"><B>Consumer
no</b></td>
<td width="289" colspan="4"><h3><u>P.O.Stamp</u></h3></td>
</tr>
<!-- Row 2 -->
<tr>
<td width="182" colspan="3" align="center">Leena P, Cross
Roads<p align="center">Off Haji Ali Road.</td>
<td width="131" colspan="2" align = "center">PL 0051077</td>
<td width="71" align="center"> </td>
<td width="91" colspan="2" align="center"> </td>
<td width="126" align="center"> </td>
</tr>
<!-- Row
<tr>
<td
<td
<td
<td
<td
</tr>
3 -->
<!-- Row
<tr>
<td
<td
<td
<td
<td
</tr>
4 -->
width="92" align="center">Telephone no</td>
width="90" colspan="2" align="center">Type</td>
width="131" colspan="2" align="center">Bill date</td>
width="162" colspan="3" align="center">Due Date</td>
width="126" align="center">Pay By Date</td>
width="92" align="center">575077</td>
width="90" colspan="2" align="center">Genl res Perm</td>
width="131" colspan="2" align="center">01- Aug-2001</td>
width="162" colspan="3" align="center">18-Aug-2001</td>
width="126" align="center">25-Aug-2001</td>
<!-- Row 5 -->
<tr>
<td width="92" align="center">OPENING METER READING</td>
<td width="90" colspan="2" align="center">CLOSING METER
READING</td>
<td width="65" align="center">METERED CALLS</td>
Prof. Mukesh N. Tekwani {Mobile: 9869 488 356 }
Page 9 of 14
11. AC I-Unit 1: HTML Tables - Examples
<td width="181" colspan="2" align="center">SURCHARGE AFTER
PAY BY DATE</td>
<td width="132" colspan="3" align="center">10</td>
<td width="78" colspan="2" align="center">TKP/PG CALLS</td>
<td width="85" align="center">16/05/97 <br> to <br>
15/07/97</td>
<td width="126" align="center">0.00</td>
</tr>
<!-- Row 11 -->
<tr>
<td width="181" colspan="2" align="center">AMT ON/
BEFORE PAY BY DATE</td>
<td width="132" colspan="3" align="center">290</td>
<td width="78" colspan="2" align="center">ITX CALLS</td>
<td width="85" align="center">16/05/97 <br> to <br>
15/07/97</td>
<td width="126" align="center">0.00</td>
</tr>
<!-- Row 12 -->
<tr>
<td width="181" colspan="2" align="center">AMT AFTER PAY BY
DATE</td>
<td width="132" colspan="3" align="center">300</td>
<td width="78" colspan="2" align="center">MISC</td>
<td width="85" align="center">TAX</td>
<td width="126" align="center">14.00</td>
</tr>
<!-- Row
<tr>
<td
<td
<td
<td
</tr>
13 -->
<!-- Row
<tr>
<td
<td
<td
</tr>
14 -->
width="181"
width="132"
width="162"
width="126"
colspan="2" align="center"> </td>
colspan="3" align="center"> </td>
colspan="3" align="center">TOTAL</td>
align="center">290.00</td>
width="313" colspan="5"> </td>
width="162" colspan="3">ADDRESS</td>
width="126"> </td>
<!-- Row 15 -->
<tr>
<td width="313" colspan="5"> </td>
<td width="289" colspan="4">PLEASE PAY BEFORE DUE DATE AND
AVOID DISCONNECTION<p> </td>
Prof. Mukesh N. Tekwani {Mobile: 9869 488 356 }
Page 11 of 14
12. AC I-Unit 1: HTML Tables - Examples
</tr>
<!-- Row
<tr>
<td
FOR
<td
</tr>
16 -->
width="313" colspan="5">E & O.E. PLEASE SEE OVERLEAF
CODES / INSTRUCTIONS</td>
width="289" colspan="4"> Accounts Officer</td>
</table>
</body>
</html>
12.Write HTML code to display the calendar for the month of April 2004 in
the following format
April 2004
ABC CORP
04 - 2004
SUN
4
11
18
25
MON
5
12
19
26
TUE
6
13
20
27
WED
7
14
21
28
THUR
1
8
15
22
29
FRI
2
9
16
23
30
SAT
3
10
17
24
Sponsors
APRIL 2004
13. Write an html page to display the following table
Page 12 of 14
mukeshtekwani@hotmail.com
13. AC I-Unit 1: HTML Tables - Examples
T.Y.B.Sc.
Department of Computer Science
Main
Applied Component
Data Communication
DBMS
Web Design
Advanced Java
Operating System
Linux
SSAD
Web Technology
OOAD
Data communication & Networking
Author
Behrouz
Forouzan
Andrew s.
Tanenbaum
Name
price
DCN
300/-
TCP/IP
350/-
Networking
400/-
William
Stallings
Computer
Communication &
Networking
Total Cost
(total 4 books)
Operating System
Author
Name
Price
Andrew s.
Tanenbaum
Operating
system
William
Stallings
Operating
system
Concepts
Total
Rs.1000/-
500/-
Rs.1450/-
400/-
14.Create an HTML page, which should look like follows.
1. The HTML page should have an appropriate title. The data within the table should be
center aligned. Demonstrate the program to the examiner. Take a printout of the HTML
code and attach with your answer sheet.
2. Explain all the HTML tags and the attributes that you have used in the above program.
This is a simple table for which you have to give the code.
HTML
ASP
Hyper Text Markup
Active Server Pages
Language
HTML 4.0
ASP 2.0
This is a table using Rowspan and Colspan
Prof. Mukesh N. Tekwani {Mobile: 9869 488 356 }
CFML
Cold Fusion Markup
Language
CFML 5.0
Page 13 of 14
14. AC I-Unit 1: HTML Tables - Examples
No. of Students
Year
Year
Year
2001
2002
2003
58
96
154
Total
288
COMPUTER SCIENCE
Page 14 of 14
mukeshtekwani@hotmail.com