Creating Web Pages with HTML, 3e - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

Creating Web Pages with HTML, 3e

Description:

Create hypertext links to various Internet resources, including FTP servers and newsgroups ... surfing Go to the surfing newsgroup /a . Creating Web Pages with ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 40
Provided by: course182
Category:

less

Transcript and Presenter's Notes

Title: Creating Web Pages with HTML, 3e


1
New Perspectives on Creating Web Pages with HTML
  • Tutorial 2 Adding Hypertext Links to a Web Page

2
Tutorial Objectives
  • Create hypertext links between elements within a
    Web page
  • Create hypertext links between Web pages
  • Review basic Web page structures
  • Create hypertext links to Web pages on the
    Internet
  • Distinguish between and be able to use absolute
    and relative pathnames
  • Create hypertext links to various Internet
    resources, including FTP servers and newsgroups

3
Opening A Web Page
4
Adding Hypertext Links
5
Adding Hypertext Links
  • 1. Type the headings into the HTML file
  • 2. Mark each destination in file using an anchor.
  • 3. Link the text you added in step 1 to your
    anchors created in step 2.

6
Creating Anchors
  • Each anchor has its own anchor name, using the
    name attribute i.e.
  • lta nameccgtClasseslt/agt.
  • An anchor doesnt have to be text. You can mark
    an inline image as an anchor.
  • Adding an anchor does not change your documents
    appearance in any way.

7
How an Anchor Works
8
Creating Links
  • To create a link to an anchor, use the ltagt tag.
  • Use the href attribute, which is short for
    Hypertext Reference, to indicate the location to
    jump to.
  • href can refer to an anchor in the document or to
    any resource anywhere on the Internet
  • the href attribute is case sensitive
  • You link to an anchor using the anchor name
    preceded by a pound () symbol
  • lta hrefgragtGradinglt/agt.

9
Creating Links Continued
10
Web Page Structures
  • Storyboarding your Web pages before you create
    links helps you determine which structure works
    best for the type of information youre
    presenting.
  • You want to ensure that readers can navigate
    easily from page to page without getting lost.

11
Linear Structures
12
Augmented Linear Structure
13
Hierarchical Structure
14
Hierarchical Structure on AltaVista Web Page
15
Combination of Linear and Hierarchical Structures
16
Web Structures Continued
  • The best time to organize a structure is when you
    first start creating pages, when those pages are
    small in number and more easily managed !

17
Multipage Document with No Coherent Structure
18
Creating Links Among Documents
19
Linking to a Document
  • To create a link to a document, use the same tag
    with the href attribute
  • lta hrefcontact.htmgtContact melt/agt.
  • In order for the browser to be able to locate and
    open contact.htm, it must be in the same folder
    as the document containing the link (chem.htm).

20
HTML Code that Links to Other Documents
21
Browser Displaying Links to Other Documents
22
Linking to a Section of a Document
  • To navigate to a specific location elsewhere in a
    document, rather than the top, you can set
    anchors and link to an anchor you create within
    the document.
  • lta hrefhome.htminterestsgt View my interests
    lt/agt

23
Adding Links to Specific Locations in a Page
The pound symbol () in these tags (shown in red)
distinguishes the filename from the anchor name.
24
Links in the Chemistry Page thatPoint to Anchors
in the Links Page
25
Linking to Documents in Other Folders
  • When referencing a file located in a different
    folder than the link tag, you must include the
    location, or path, for the file.
  • HTML supports two kinds of paths absolute paths
    and relative paths.

26
Absolute Pathnames
  • An absolute pathname provides a precise location
    for a file.
  • With HTML, absolute pathnames begin with a slash
    (/) and are followed by a sequence of folders
    beginning with the highest level folder and
    proceeding to the folder that contains the file.
  • HTML also requires you to include the drive
    letter followed by a vertical bar ()
  • /C/tutorial.02/case/parks.htm.

27
Folder Tree
28
Relative Pathnames
  • A relative path specifies the location for a file
    in relation to the folder containing the current
    Web document.
  • Unlike absolute pathnames, a relative pathname
    does not begin with a slash.
  • To reference a file in a folder directly above
    the current folder in the folder hierarchy,
    relative pathnames use two periods (..)
    ../tutorial/chem.htm.

29
Relative Pathnames Continued
  • Relative pathnames make your hypertext links
    portable.
  • Unlike absolute pathnames, If you move your files
    to a different computer or server, the hypertext
    links will stay intact.

30
Linking to Documents on the Internet
  • To create a hypertext link to a document on the
    Internet, you need to know its URL.
  • lta href http//www.mwu.edu/course/info.htmlgtCourse
    Informationlt/agt.

31
Interpreting Parts of a Uniform Resource Locator
(URL)
32
Link to Another Page on the Web
33
Displaying Linked Documents in a New Window
  • To force a document to appear in a new window,
    instead of the main browser window, you would use
    the target attribute in the href tag
  • lta hrefurl targetnew_windowgtHypertextlt/agt
  • url is the URL of the page, and new_window is a
    name assigned to the new browser window

34
External Hyperlinks
  • You can set up external hyperlinks to open in the
    same browser window using the same target
    attribute
  • If you want your external documents to be
    displayed in their own browser window, you can
    assign a unique target value for each hyperlink,
    or you can assign the _blank keyword to the
    target attribute
  • lta hrefurl target_blankgtHypertextlt/agt.

35
Linking to File Transfer Protocol (FTP) Servers
  • You can create links to other Internet resources,
    such as FTP (File Transfer Protocol) servers.
  • FTP servers can store files that Internet users
    can download, or transfer, to their computers
  • lta href ftp//ftp.microsoft.comgtMicrosoft FTP
    serverlt/agt.

36
Linking to Usenet News
  • Usenet is a collection of discussion forums
    called newsgroups that let users exchange
    messages with other users on a wide variety of
    topics.
  • The URL for a newsgroup is newsnewsgroup.
  • To access the newsgroup
  • lta hrefnewsalt.surfinggtGo to the surfing
    newsgrouplt/agt.

37
Linking to E-mail
  • Many Web designers include their e-mail addresses
    on their Web pages, so that users who access the
    page can send feedback.
  • You can identify e-mail addresses as hypertext
    links.
  • The URL for an e-mail address is
    mailtoe-mail_address.
  • To create a link to the e-mail address
    davis_at_mwu.edu, the following code would be
    entered
  • lta hrefmailtodavis_at_mwu.edugtdavis_at_mwu.edult/agt

38
Adding an Email Link
39
Tutorial 2 Summary
  • Learned how to work with hypertext links.
  • Learned how to create anchors within a Web page.
  • Created links to anchors.
  • Created hyperlinks within a single document and
    links to other Web pages.
  • Discussed creating hyperlinks to resources other
    than Web pages, such as FTP sites, e-mail
    addresses and Gopher servers.
Write a Comment
User Comments (0)
About PowerShow.com