HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

52
HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site

Transcript of HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

Page 1: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

HTMLComprehensive Concepts and Techniques

Third Edition

Project 4

Creating Tables in a Web Site

Page 2: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

2HTML Project 4: Creating Tables in a Web Site

Project Objectives

• Define table elements

• Describe the steps used to plan, design, and code a table

• Create a borderless table to organize images

• Create a vertical menu bar with text links

Page 3: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

3HTML Project 4: Creating Tables in a Web Site

Project Objectives

• Create a borderless table to organize text

• Create a horizontal menu bar with text links

• Create a table with borders

• Change the horizontal alignment of text

Page 4: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

4HTML Project 4: Creating Tables in a Web Site

Project Objectives

• Add background color to rows and cells

• Alter the spacing between and within cells using the cellspacing and cellpadding attributes

• Insert a caption below a table

• Use the rowspan and colspan attributes

Page 5: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

5HTML Project 4: Creating Tables in a Web Site

Starting Notepad

• Click the Start button on the taskbar• Point to All Programs on the Start menu, point to

Accessories on the All Programs submenu, and then click Notepad on the Accessories submenu

• If the Notepad window is not maximized, click the Maximize button on the Notepad title bar to maximize it

• Click Format on the menu bar and, if necessary, click Word Wrap to turn Word Wrap on

Page 6: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

6HTML Project 4: Creating Tables in a Web Site

Entering the HTML Tags to Define the Web Page Structure

Page 7: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

7HTML Project 4: Creating Tables in a Web Site

Creating a Borderless Table to Position Images• If necessary, click line 10

• Type <table border="0" cols="2“ width="90%"> and then press the ENTER key

Page 8: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

8HTML Project 4: Creating Tables in a Web Site

Creating a Borderless Table to Position Images

Page 9: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

9HTML Project 4: Creating Tables in a Web Site

Inserting Images in a Table

• If necessary, click line 11, type <tr> as the tag, and then press the ENTER key

• Type <td><img src=“bellvideologo.gif” width=“430” height=“74” alt=“Bell Video Logo” /></td> and then press the ENTER key

• Type <td><img src="csexcellence.gif" width="108” height=”94” alt=”Excellence Award” /></td> and then press the ENTER key

• Type </tr> and then press the ENTER key• Type </table> and then press the ENTER key

Page 10: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

10HTML Project 4: Creating Tables in a Web Site

Creating a Vertical Menu Bar with Text Links• If necessary, click line 17

• Enter the HTML code shown below

• Press the ENTER key twice

Page 11: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

11HTML Project 4: Creating Tables in a Web Site

Creating a Vertical Menu Bar with Text Links

Page 12: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

12HTML Project 4: Creating Tables in a Web Site

Adding Text to a Table Cell

• If necessary, click line 27

• Enter the HTML code as shown in Table 4-5 on page HTM 151 and then press the ENTER key

Page 13: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

13HTML Project 4: Creating Tables in a Web Site

Adding Text to a Table Cell

Page 14: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

14HTML Project 4: Creating Tables in a Web Site

Saving and Printing the HTML File

• With a floppy disk in drive A, click File on the menu bar and then click Save As. Type bellvideohome.htm in the File name text box

• If necessary, click 31⁄2 Floppy (A:) in the Save in list. Click the Project04 folder and then click the Project Files folder in the list of available folders. Click the Save button in the Save As dialog box

• Click File on the menu bar and then click Print on the File menu

Page 15: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

15HTML Project 4: Creating Tables in a Web Site

Viewing and Printing a Web Page

Page 16: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

16HTML Project 4: Creating Tables in a Web Site

Copying and Pasting HTML Code to a New File• Click the Notepad button on the taskbar• Click immediately to the left of the < in the <!

DOCTYPE html tag on line 1. Drag through the first </table> tag on line 15 to highlight lines 1 through 15

• Press CTRL+C to copy the selected lines to the Clipboard

• Click File on the menu bar and then click New• Press CTRL+V to paste the contents from the

Clipboard into a new file

Page 17: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

17HTML Project 4: Creating Tables in a Web Site

Copying and Pasting HTML Code to a New File

Page 18: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

18HTML Project 4: Creating Tables in a Web Site

Changing the Title

• Highlight the words, — Great Service, Great Selection, between the <title> and </ title > tags on line 7. Type - New Releases as the text

• Click immediately to the right of the </table> tag on line 15. Press the ENTER key three times

• Type </body> and then press the ENTER key• Type </html> as the end tag

Page 19: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

19HTML Project 4: Creating Tables in a Web Site

Changing the Title

Page 20: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

20HTML Project 4: Creating Tables in a Web Site

Deleting an Image

• Highlight line 13, which contains the code to insert the image, csexcellence.gif

• Press the DELETE key twice

Page 21: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

21HTML Project 4: Creating Tables in a Web Site

Deleting an Image

Page 22: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

22HTML Project 4: Creating Tables in a Web Site

Creating a Horizontal Menu Bar with Text Links• If necessary, click line 16

• Enter the HTML code as shown in Table 4-6 on page HTM 159

• Press the ENTER key twice

Page 23: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

23HTML Project 4: Creating Tables in a Web Site

Creating a Horizontal Menu Bar with Text Links

Page 24: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

24HTML Project 4: Creating Tables in a Web Site

Creating a Table with Borders and Inserting Text• If necessary, click line 28

• Enter the HTML code as shown in Table 4-7 on page HTM 162

• Press the ENTER key twice

Page 25: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

25HTML Project 4: Creating Tables in a Web Site

Creating a Table with Borders and Inserting Text

Page 26: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

26HTML Project 4: Creating Tables in a Web Site

Creating Additional Cells and Inserting Text• If necessary, click line 53

• Enter the HTML code as shown in Table 4-8 on page HTM 164

Page 27: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

27HTML Project 4: Creating Tables in a Web Site

Creating Additional Cells and Inserting Text

Page 28: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

28HTML Project 4: Creating Tables in a Web Site

Saving and Printing an HTML File

• With a floppy disk in drive A, click File on the menu bar and then click Save As. Type newreleases.htm in the File name text box

• If necessary, click 3½ Floppy (A:) in the Save in list. Click the Project04 folder and then click the ProjectFiles folder in the list of available folders. Click the Save button in the Save As dialog box

• Click File on the menu bar and then click Print on the file menu

Page 29: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

29HTML Project 4: Creating Tables in a Web Site

Viewing and Printing the Web Page Using the Browser

Page 30: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

30HTML Project 4: Creating Tables in a Web Site

Opening an HTML File

• Click the Notepad button on the taskbar• With the HTML Data Disk in drive A, click File on the

menu bar and then click Open on the File menu• If necessary, click the Look in box arrow and then click

31⁄2 Floppy (A:). Click the Project04 folder and then click the Project Files folder in the list of available folders

• If necessary, click the Files of type box arrow and then click All Files

• Click actor.htm in the list of files and then click the Open button in the Open dialog box

Page 31: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

31HTML Project 4: Creating Tables in a Web Site

Opening an HTML File

Page 32: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

32HTML Project 4: Creating Tables in a Web Site

Adding Cellspacing and Cellpadding to a Table• Click immediately to the right of the 5 in

border=“5” in line 28 and then press the SPACEBAR

• Type cellpadding=“2” cellpadding=“5” as the attributes

Page 33: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

33HTML Project 4: Creating Tables in a Web Site

Adding Cellspacing and Cellpadding to a Table

Page 34: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

34HTML Project 4: Creating Tables in a Web Site

Adding a Table Caption

• Highlight the text <!--Insert caption here --> on line 69

• Type <caption align=“bottom”><em>Listing of movies by actor</em></caption> as the tag

Page 35: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

35HTML Project 4: Creating Tables in a Web Site

Adding a Table Caption

Page 36: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

36HTML Project 4: Creating Tables in a Web Site

Saving and Printing the HTML File and Viewing and Printing the Web Page

• With the floppy disk in drive A, click File on the menu bar and then click Save

• Click File on the menu bar and then click Print• Click the Internet Explorer button on the taskbar• Click the Refresh button on the Standard

Buttons toolbar• Click the Print button on the Standard Buttons

toolbar

Page 37: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

37HTML Project 4: Creating Tables in a Web Site

Saving and Printing the HTML File and Viewing and Printing the Web Page

Page 38: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

38HTML Project 4: Creating Tables in a Web Site

Opening an HTML File

• Click the Notepad button on the taskbar• With the HTML Data Disk in drive A, click File on

the menu bar and then click Open on the File menu

• If necessary, click the Look in box arrow and then click 3½ Floppy (A:). Click the Project04 folder and then click the ProjectFiles folder in the list of available folders

• If necessary, click the Files of type box arrow, click All Files, and then double-click type.htm in the list of files.

Page 39: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

39HTML Project 4: Creating Tables in a Web Site

Spanning the Main Heading across All Columns• Highlight the <!—Insert Movies by Type colspan

here --> text on line 29. Type <tr> and then press the ENTER key

• Type <th colspan="3" bgcolor="lightsteelblue"> and then press the ENTER key

• Type <font color="#993366“ face="chaucer“ size="+2">Movies by Type</font> and then press the ENTER key

• Type </th> and then press the ENTER key• Type </tr> as the end table row tag

Page 40: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

40HTML Project 4: Creating Tables in a Web Site

Spanning the Main Heading across All Columns

Page 41: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

41HTML Project 4: Creating Tables in a Web Site

Creating Headings that Span Rows and Columns• Highlight <!--Insert Action rowspan here --

> text on line 34

• Enter the HTML code as shown in Table 4-9 on page HTM 179

Page 42: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

42HTML Project 4: Creating Tables in a Web Site

Creating Headings that Span Rows and Columns

Page 43: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

43HTML Project 4: Creating Tables in a Web Site

Creating the Second Heading that Spans Rows• Highlight the <!--Insert Comedy rowspan here --

> text on line 66 and then press the DELETE key

• Type <tr> and then press the ENTER key• Type <th rowspan="4" bgcolor="#336699"> and then press the ENTER key

• Type <font color="#ffffff“ size="+1">Comedy</font> and then press the ENTER key

• Type </th> as the tag

Page 44: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

44HTML Project 4: Creating Tables in a Web Site

Creating the Second Heading that Spans Rows

Page 45: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

45HTML Project 4: Creating Tables in a Web Site

Creating the Second Heading that Spans Columns• Highlight the <!--Insert Title - Actor(s) colspan

here --> text on line 70• Type <th colspan="2" bgcolor="thistle"> and then press the ENTER key

• Type <font color="#336699" size="+1">Title - Actor(s)</font> and then press the ENTER key

• Type </th> and then press the ENTER key• Type </tr> and then press the ENTER key

Page 46: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

46HTML Project 4: Creating Tables in a Web Site

Creating the Second Heading that Spans Columns

Page 47: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

47HTML Project 4: Creating Tables in a Web Site

Saving and Printing the HTML File and Viewing and Printing the Web Page

• With the HTML Data Disk in drive A, click File on the menu bar and then click Save

• Click File on the menu bar and then click Print• Click the Internet Explorer button on the taskbar• Click the Refresh button on the Standard

Buttons toolbar• Click the Print button on the Standard Buttons

toolbar

Page 48: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

48HTML Project 4: Creating Tables in a Web Site

Saving and Printing the HTML File and Viewing and Printing the Web Page

Page 49: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

49HTML Project 4: Creating Tables in a Web Site

Project Summary

• Define table elements

• Describe the steps used to plan, design, and code a table

• Create a borderless table to organize images

• Create a vertical menu bar with text links

Page 50: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

50HTML Project 4: Creating Tables in a Web Site

Project Summary

• Create a borderless table to organize text

• Create a horizontal menu bar with text links

• Create a table with borders

• Change the horizontal alignment of text

Page 51: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

51HTML Project 4: Creating Tables in a Web Site

Project Summary

• Add background color to rows and cells

• Alter the spacing between and within cells using the cellspacing and cellpadding attributes

• Insert a caption below a table

• Use the rowspan and colspan attributes

Page 52: HTML Comprehensive Concepts and Techniques Third Edition Project 4 Creating Tables in a Web Site.

HTMLComprehensive Concepts and Techniques

Third Edition

Project 4 Complete