Top Banner
Unit 9 – Tables Presentation 1 Web Programming
25

M02 un09 p01

Jan 20, 2015

Download

Technology

Intan Jameel

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: M02 un09 p01

Unit 9 – Tables

Presentation 1

Web Programming

Page 2: M02 un09 p01

Revision

1. Write how to add music to a Web page.

2. Name the attributes of the <EMBED> tag.

3. Write how to add movie to a Web page.

4. Write how to add animation to a Web page.

Page 3: M02 un09 p01

Objectives

At the end of this presentation, you will be able to• Insert tables into your Web page• Add caption, heading and border to your table• Modify the rows and columns as per the need

Page 4: M02 un09 p01

Tables

• Tables can be added to Web page.• HTML provides tags to add tables into a Web

page easily.

Page 5: M02 un09 p01

Hands-On!

• Open the HTML file Table.HTML in IE.• This HTML document illustrates how to insert

table in a Webpage.

Page 6: M02 un09 p01

Creating Table

• Table can be created using three tags.• <TABLE> tag is used to create table.• <TR> tag is used to insert a row in a table.• <TD> tag is used to insert a cell in the row.

Page 7: M02 un09 p01

Hands-On!

• Open the HTML file Table1.HTML in IE.• This HTML document illustrates how to

creates a Web page with simple table.

Page 8: M02 un09 p01

Lab Exercise

1. Open D9_1.html in Internet Explorer. a. Name the tag which is used to create the

table in source code D9_1.html.b. Identify the tag which is used to display

the comment with a table.c. Name the tag which is used to add a row

into the table.d. Identify the tag which is used to add a

data into the table.

Page 9: M02 un09 p01

Lab Exercise Contd.

e. Locate the attribute which is used to set border for the table.

f. Name the tag which is used to add a cell header.

Page 10: M02 un09 p01

Lab Exercise

2. Open D9_1.html in Internet Explorer.

a. View the source code in the Notepad.

b. Change the border size to 5.

c. Add one more row into the table.

d. Add a data into the new row.

Page 11: M02 un09 p01

Lab Exercise

3. Open States.html that you have created under the folder in your name in C: Modify the program and display the output as shown in the following figure using <TABLE> tag.

Page 12: M02 un09 p01

Lab Exercise Contd.

Page 13: M02 un09 p01

Heading Tag

• <TH> tag is used to display the heading.• <TH> stands for Table Heading.

Page 14: M02 un09 p01

Caption and Border

• <CAPTION> tag is used to add a caption to a table.

• Border attribute of <TABLE> tag is used to add borders

Page 15: M02 un09 p01

Hands-On!

• Open the HTML file Table2.HTML in IE.• This HTML document illustrates how to add

heading, caption and border to the table.

Page 16: M02 un09 p01

Lab Exercise

4. Open D9_2.html in Internet Explorer.

a. List out the attributes are in <TABLE> tag.

b. Name the attribute which is used to set the width of the table.

c. Locate the attribute which is used to display the text after the table.

Page 17: M02 un09 p01

Lab Exercise

d. Identify the attribute which is used to change the background colour of the table in source code D9_2.html.

e. Name the attribute which is used to change the border colour of the table in source code D9_2.html.

Page 18: M02 un09 p01

Lab Exercise

5. Open D9_2.html in Internet Explorer.

a. View the source code in the Notepad.

b. Set the caption attribute alignment to top.

c. Change the background colour of the table

to yellow.

d. Change the border colour of the table to

maroon.

Page 19: M02 un09 p01

Activity 2.9.1

• Create a Web page that explains how to add multimedia objects in a Web page as shown in Figure.

• Save the HTML file as Activity1.html in C:\HTML\Unit9\Activity folder.

Page 20: M02 un09 p01

Activity 2.9.1 Contd.

Page 21: M02 un09 p01

Rows and Columns

• Rowspan and Colspan attribute.• Rowspan joins two or more cells in a column

into a single cell.• Colspan joins two or more cells in a row into

a single cell.

Page 22: M02 un09 p01

Hands-On!

• Open the HTML file Table3.HTML in IE.• This HTML document illustrates how to

adding the heading COUNTRIES that span from second column of fourth column.

Page 23: M02 un09 p01

Summary

In this presentation, you learnt the following:• A simple table can be created using three tags

namely <TABLE>, <TR> and <TD>.• The <TH> tag is used to display the headings in

a table.• The <CAPTION> tag is used to add a caption to

a table.

Page 24: M02 un09 p01

Summary

• Two or more cells can be joined together using Rowspan and Colspan attributes of the <TH> and <TD> tags.

• The height of the cells in a row can be set using the Height attribute of the <TH> or <TD> tag.

Page 25: M02 un09 p01

Assignment

1. Name that tags that are used to create a simple table?

2. How will you add a caption to a table?