HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

106
HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links

Transcript of HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

Page 1: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

HTMLComprehensive Concepts and TechniquesSecond Edition

Project 2

Creating a Web Sitewith Links

Page 2: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

2

Objectives

Describe linking terms and definitionsAdd a link to another Web pageCreate a home pageEnhance a Web page using imagesAdd bold, italics, and color to textChange bullet typeInsert a background image

Page 3: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

3

Objectives

Insert a horizontal rule imageAdd an e-mail linkView the HTML file and test the linksEdit the second Web pageInsert an image and wrap text around

an imageAdd a text link to another Web site

Page 4: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

4

Objectives

Add an image link to another Web siteCreate links within a Web pageSet link targetsAdd links to set targetsDescribe types of image filesControl image sizingLocate images

Page 5: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

5

Introduction to Links

Hyperlinks (or links) are used to connect a Web page to another Web page

Links can also be used to create an email link

Either text or an image can be used as a hotspot for a link– The mouse pointer usually changes when

positioned over a hotspot– URL appears on status bar when the mouse

pointer is over a hotspot

Page 6: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

6

Introduction to Links

status bar

text link image link

Page 7: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

7

Introduction to Links

With text links, always use descriptive text as the clickable word(s)

Unless otherwise stated, the color of text links is dependent upon browser-defined defaults

Format to change link colors:

<BODY LINK=“color” VLINK=“color” ALINK=“color”>

Page 8: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

8

Introduction to Links

normal link (LINK)

visited link (VLINK)

active link (ALINK)

Page 9: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

9

Linking within a Web PageAllows visitors to move quickly from

one section of the Web page to another

Important for large Web pages– Commands– Table of contents

Page 10: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

10

Linking within a Web Page

links to targets

targets

Page 11: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

11

Linking to Another Web Page within the Same Web Site

Page 12: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

12

Linking to Another Web Site

Page 13: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

13

Linking to E-Mail

Page 14: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

14

Start Notepad

Click the Start button on the taskbar and then point to Programs on the Start menu

Point to Accessories on the Programs submenu and then point to Notepad on the Accessories submenu

Click NotepadIf necessary, click the Maximize buttonClick Edit on the menu barIf Word Wrap is not checked, click Word

Wrap

Page 15: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

15

Start Notepad

Page 16: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

16

Creating a Home Page

A home page is the main page of a Web site– Visitors usually view the home page first– Identify the purpose of your Web site– Links should be apparent– Include an e-mail link

Page 17: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

17

Enter Initial HTML Tags

Page 18: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

18

Entering a Heading

The <FONT> tag can enhance the heading

Various FONT attributes

Page 19: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

19

Sample Font Attributes

normal text text with color

different font face

different font size

Page 20: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

20

Enter the Heading

You should alwaysend the tags in the opposite directionfrom which you

started them

heading code

Page 21: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

21

Enter the Text

Page 22: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

22

Enter the Bulleted ListsEnter two bulleted lists, using the code

below:

Page 23: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

23

Modified HTML Document

code for bulleted lists

Page 24: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

24

Web Page Images

Classes of Images– Inline images– External images

Image types– JPEG– GIF– Interlaced GIF– PNG

Page 25: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

25

Image Attributes

Attributes that can be used with the <IMG> tag

Page 26: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

26

Inserting a Background ImageThe BACKGROUND attribute inserts

the background image on a Web page

Page 27: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

27

Inserting a Horizontal Rule ImageSetting the HEIGHT and WIDTH

attribute helps the image display fasterDefining an image too large will make it

appear grainy

Page 28: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

28

Copying and Pasting TextEliminates the need to type the same

command more than onceHelps eliminate errors in typing

commands repeatedlyCopy and Paste functionality is also

available in other Windows applications

Page 29: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

29

Copying and Pasting Text

highlight the textyou wish to copyClick the Edit menu

Page 30: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

30

Copying and Pasting Text

Point to and click Copy

Page 31: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

31

Copying and Pasting Text

Position your cursor where you want to paste the text

Click the Edit menu

Page 32: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

32

Copying and Pasting Text

Point to and click Paste

Page 33: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

33

Copying and Pasting Text

pasted line

Page 34: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

34

Adding a Link to the Second Web PageThe <A> and </A> tags are used to

create links– Referred to as anchor tags

Use the Hyperlink REFerence (HREF) attribute to link to another Web page

Two items required– Text or image to act as hotspot– Name of the file to which you want to link

Page 35: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

35

Adding a Link to the Second Web Page

Page 36: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

36

Adding a Link to Another Web Page

Enter the following text into your document

Page 37: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

37

Adding a Link to Another Web Page

Add this command beforethe word “sample”

Add this command afterthe word “sample”

Page 38: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

38

Anchor Tag Anatomy

<A HREF=“sample1.htm”>sample</A>

link to sample1.htm page text used for link

end oflink

Page 39: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

39

Adding an E-Mail Link

It is necessary to instruct visitors to contact you with any information or suggestions

The <A> and </A> tags are also used to create email links

Page 40: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

40

Adding an E-Mail Link

add this text

Page 41: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

41

E-Mail Link Anatomy

<A HREF=“mailto:[email protected]”>[email protected]</A>

link to e-mail address e-mailaddress

end oflink

Page 42: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

42

Saving and Printing the HTML FileInsert the HTML Data Disk in drive A:Select Save As from the File menu

– Save to your A: drive– Save with the filename webreshome.htm

Click the Save buttonSelect Print from the File menu

Page 43: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

43

HTML File Printout

Page 44: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

44

Viewing the Web Page

To View the Web Page– Start your browser– Maximize your browser window– Click the Address bar– Type a:\webreshome.htm in the

Address text box– Press the ENTER key

Page 45: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

45

Viewing the Web Page

home page

horizontal ruleimage

changed bullet types

changed bullet types horizontal ruleimage

text link to second pagee-mail link

background image

Page 46: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

46

Printing the Web Page

Click the Print button on the Standard Buttons toolbar

Page 47: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

47

Testing the Links

Point to and click the e-mail link

Page 48: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

48

Testing the Links

e-mail address inTo: text box

click theclose button

Page 49: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

49

Testing the Links

With the HTML Data Diskin drive A, point to and click

the link, sample

Page 50: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

50

Testing the Links

Second Web page should

appear

Page 51: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

51

Editing the Second Web PageOpen the HTML file

– Click the Notepad button on the taskbar– With the HTML Data Disk in drive A,

select Open from the File menu– Select 3½ Floppy (A:) from the Look in

box– Select All Files (*.*) from the Files of type

box– Click sample1.htm– Click the Open button

Page 52: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

52

sample1.htm

Page 53: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

53

Text Formatting Tags

Page 54: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

54

Formatted Text Samples

bold text

normal text

BIG text

BLOCKQUOTE

italicized textSubscript &superscript

strikethrough text

teletype / monospace text

underlined text

Page 55: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

55

Bold the Text

Type the tag <B> immediatelyto the left of “Objective”

Page 56: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

56

Bold the Text

Type the tag </B> immediatelyto the right of “Objective”

Page 57: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

57

Bold the Text

Repeat the process to bold“COMPUTER TECHNOLOGY”

and“PURDUE UNIVERSITY”

Page 58: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

58

Italicize the Text

Type the tag <I> immediatelyto the left of “Marie”

Page 59: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

59

Italicize the Text

Type the tag </I> immediatelyto the right of “Santos”

Page 60: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

60

Italicize the Text

Repeat the process to italicize“PURDUE UNIVERSITY”

Page 61: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

61

Multiple TagsAdd these

multiple tags

Page 62: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

62

Change Text Color

Type <FONT COLOR=“#000099”>

Type </FONT>

Page 63: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

63

Change the Bullet Type

Type the TYPE=“square” argument in the <UL> tag

Page 64: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

64

Change the Bullet Type

Repeat the process to changethe bullet type in these

three places

Page 65: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

65

Preview the Page in Your BrowserClick the File menu and select SaveActivate your browserClick the Refresh button on the

Standard Buttons toolbar

Page 66: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

66

colored text

bold text

bold text

square bullets

Bold and italicized text

square bullets

Bold and italicized text

square bullets

Bold and italicized text

square bullets

Page 67: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

67

Image Borders

A border on an image makes the image display as if it has a frame around it

If the image is a link, the default (or selected) link color will be the color of the border

Page 68: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

68

Image Borders

image withborder

image withborder andnormal link

image withborder andvisited link

Page 69: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

69

Image Alignment

Format to align images:<IMG SRC=“ovallaeb.gif” ALIGN=RIGHT>

To end right-aligned text wrap:

<BR CLEAR=RIGHT>To end left-aligned text wrap:

<BR CLEAR=RIGHT>Top, Middle, and Bottom alignment

Page 70: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

70

Image Alignment

imageALIGN=RIGHT

Page 71: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

71

Image Alignment

imageALIGN=LEFT

Page 72: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

72

Image Alignment

imageALIGN=TOP

Page 73: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

73

Image Alignment

imageALIGN=MIDDLE

Page 74: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

74

Image Alignment

imageALIGN=BOTTOM

Page 75: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

75

Inserting an Imagewith Wrapped TextClick the Notepad button on the

taskbarAfter the <BR> tag in line 31, type:<IMG SRC=“ovallaeb.gif” BORDER=0 HEIGHT=119 WIDTH=182 ALIGN=RIGHT ALT=“[Purdue Fountain]”>

Page 76: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

76

Inserting an Imagewith Wrapped Text

Page 77: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

77

Inserting an Imagewith Wrapped Text

alternate text

Page 78: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

78

Adding a Text Linkto Another Web Site

Type <A HREF=“http://www.purdue.edu”>

Type </A> to end the tag

Page 79: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

79

Adding a Text Linkto Another Web Site

text link

Page 80: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

80

Adding an Image Linkto Another Web Site

HREF forimage linkending

image link

Page 81: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

81

Adding an Image Linkto Another Web Site

image link

Page 82: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

82

Creating Links withina Web PageThese links are especially useful on

long Web pagesLinks at the top of the page point to

areas further down the pageSet the targets for the links

– A target is a section within a Web page to which you want to link

Page 83: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

83

Creating Links withina Web Page

link to education target

Page 84: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

84

Creating Links withina Web Page

target named education

Page 85: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

85

Setting the Link Targets

Set the first twolink targets

Page 86: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

86

Setting the Link Targets

Set the last twolink targets

Page 87: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

87

Adding Links to the Targets

Bulleted list for target menu

Page 88: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

88

Linking to the Top of the PagePlace a target named “top” at the top of

the page, just underneath the body tag<A NAME=“top”></A>

Create links to the top target throughout the page<A HREF=“#top”>To Top</A>

Line 38Line 80Line 89

Page 89: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

89

Link Back to Home PageClick the line just above the </BODY>

tagType <P><I><A HREF=“webreshome.htm”>Return to Web Res home page </A></I></P>

Save the HTML filePrint the file

Page 91: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

91

Print the Web Page

Click the Sample Resume button on the taskbar

Click the Refresh buttonClick the Print button on the Standard

Buttons toolbar

Page 93: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

93

Testing the Links

Very important stageClick on the links to ensure they workTest the Web pages in more than one

browser to insure that the Web pages display as you expect

Page 94: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

94

More About Images

HSPACE and VSPACE attributes control the amount of horizontal and vertical space around an image

Page 95: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

95

More About Images

VSPACE = 0

VSPACE = 20HSPACE = 0

HSPACE =20

Page 96: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

96

Thumbnail Images

Smaller versions of original imagesUsed as a link that loads the full-sized

image when clickedThumbnails load more quicklyCreate a thumbnail version by editing

the file in a graphics editor and saving it with a different filename

Page 97: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

97

Thumbnail Image

thumbnail image

enlarged image

Page 98: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

98

Obtaining Images

Images are available from a variety of sources– Clip art gallery– Create them yourself– Scanner– Digital Camera– Other Web sites

Page 99: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

HTMLComprehensive Concepts and TechniquesSecond Edition

Adobe Photoshop

Adobe Photoshop is available for both the PC and the Mac platform.

Page 100: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

100

Photoshop Basics

Adobe Photoshop allows you to edit pictures taken with a digital camera, scanned photos, or pictures from the web.

Web Developers use Photoshop often to work on pictures for a web site

iPhoto and Dell Picture Studio are other picture editors that can used also, but do not have all the features of Photoshop

Page 101: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

101

Saving Pictures in Photoshop

You can save pictures for the web using Photoshop’s “Save for Web” option in the file menu. This allows you to export a picture for use on a web page

Page 102: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

102

Summary

Describe linking terms and definitionsAdd a link to another Web pageCreate a home pageEnhance a Web page using imagesAdd bold, italics, and color to textChange bullet typeInsert a background image

Page 103: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

103

Summary

Insert a horizontal rule imageAdd an e-mail linkView the HTML file and test the linksEdit the second Web pageInsert an image and wrap text around

an imageAdd a text link to another Web site

Page 104: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

104

Summary

Add an image link to another Web siteCreate links within a Web pageSet link targetsAdd links to set targetsDescribe types of image filesControl image sizingLocate imagesBasics of Photoshop

Page 105: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

105

What You Should Know

Page 106: HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.

HTMLComprehensive Concepts and TechniquesSecond Edition

Project 2 Complete