1 - Lab Giude HTML
1 - Lab Giude HTML
Step 1: Type the following code into an html file and save it as “table1.html”.
<!-- Comment: border= “2”, specifies the border width of the table -->
<table border = “2”>
<tr>
<!-- Comment: Tag <th> is for giving a table heading -->
<th> Name </th> <th>Empno</th>
</tr>
<tr>
<td>Jack</td><td>1001</td>
</tr>
<tr>
<td>Jack</td><td>1001</td>
</tr>
</table>
Step 2: Change the border attribute value to “0” and observe what will be the output?
Step 3: Change the table tag to <table border = “2” width= “50%”>
Step 4: Right click on the desktop, select properties menu and setting tag. Find out the
resolution of your PC. (It may be 1024 x 768 pixels)
Step 5: Include a background color for the table. Can you? Save the file as
“tablecolor.html”. <table border = “2” width= “50%” bgcolor= “#CDCA8F”>
Step 6: If it possible to add a background color, try to give a background image for the
table and save the file as “tablebackground.html”.
<table border = “2” width= “50%” background= “s1.jpg”>
Step 7: Include a background color for a particular row.
Hint: Use bgcolor attribute for the <tr> tag.
Step 8: Increase the space between tow cells and save it as “tablespace.html”.
<table border = “2” width= “50%” cellspacing= “10”>
Step 9: Increase the space between the cell and the content.
<table border = “2” width= “50%” cellpadding= “20”>
Step 10: Can you give some color and size for the table elements?
Hint: Use <font> inside a <td> tag. Use CSS for avoiding the repetition of the
HTML tag for providing style.
Step 11: Create the HTML table and save it as “tablespan.html”.
Marks
1
<!-- Comment: colspan = “3” indicates that the table heading Marks will span three
columns -->
<th colspan= “3”>Marks</th>
</tr>
<tr>
<td>Sec A</td><td>Sec B</td><td>Sec C</td>
</tr>
</table>
Step 12: Create the following HTML table and save it as tablelayout.html
Hint: the above webpage created using a table with one row and three columns. The
border of the table is invisible to the users.
The <center> tag is used align the content to the center of the container. The width
attribute of the <td> tag used to specify the width of the column and valign tag is used to
align the content vertically in a cell. The valign values are top, middle, bottom and
baseline.
1. Replace the first cell content with unordered list of hyper links.
2. Replace the second cell content with an image.
3. Replace the third cell content with a paragraph.
Step 1: Type the following code into a HTML page and save it as “login.html”.
The following module is used to generate distribution list for the Nationwide courier
(You will be using this GUI as part of your Project).
Step 2: Create a HTML page named “DistributionList.html” to select the date from the
customer with the following field.
Step 3: The following module is used to accept order fro the Nationwide courier. (You
will be using this GUI as part of your Project).
3
Input fields:
1. Customer ID
2. Order Date
3. Recipient Name
4. Recipient Address
5. Recipient City – ‘Terengganu’, ‘Kelantan’, ‘Pahang’, ‘Selangor’
6. Weight of Parcel
7. Courier Description
Step 5: The following module is used to deliver the order in Nationwide. (You will be
using this GUI as part of your Project).
4
Input fields:
1. Order ID
2. Delivery Date
3. Status – ‘Pending’, ‘Delivered’, ‘Rejected’.
4. Description
5
Assignment 1
6
Assignment 2