Академический Документы
Профессиональный Документы
Культура Документы
Protocols
Relative/Absolute links
Paths
Absolute photo link
Anchors
Image Maps
Image map elements
Image map attributes
page 53
URLs
• Uniform Resource Locator
http://www.cdc.gov/travel/index.html
File name
Directory
Domain name
Protocol
index.html
• default file name that the browser looks for to display when it is
give a directory on a server to go to
• proper form of websites: home page should always be called
index.html
Protocols
PROTOCOL DESCRIPTION
file:/// Accesses a file from a local hard drive
ftp:// Accesses a file from a File Transfer Protocol (FTP)
Server
http://
c:\
mailto: used with <a href> - sends link to email
page 54
Relative/Absolute links
• Absolute = complete URL of objects location including protocol
(http://)
• Relative = location object based on file’s location
- eg. index.html
Paths
• no slash or dots = file/image inside same folder as referring
HTML file
• / = file/image inside folder one level down from referring file
• ../ = folder is one level up from referring file
Anchors
• for linking on same web page
• also referred to as bookmarks - eg: www.w3.org/MarkUp
• also, use "top of page" anchor when your are scrolled down into
a long document to take you back up to the top
• uses <id> - any id attribute can be the target of a link
1) scroll down your page and decide where you want to insert a bookmark (link to)
2) Locate the element that will appear at the top of the browser window when the
link is clicked and the page jumps down.
3) The element will have a block-level element such as <p> or <h?>
Assign the "id" and "name" attributes. The attributes will contain, inside the
quotes, a short word or group of letters that will allow you to reference that name.
4) Go to the location on your page where you want to put a hyperlink
5) Insert the <a> tag and any text you want to appear as a link. The href attribute
will have the same name as you assigned below, BUT it is preceded by a # sign
open centralvalley.html
1) below title:
<p><a href="#am1">About the Market</a></p>
<p><a href="#ho1">Hours of operation</a></p>
<p><a href="#fvl1">Featured Vendor</a></p>
2) locate: About the Market Heading
<h2><a id="am1" name="am1">About the Market</a></p>
3) Repeat for other two sections
page 56
Image Maps
• hot zones can be created on a large image
• a hot zone is associate with a link to a URL
(en.wikipedia.org/wiki/Image_map)
• based on pixel coordinates
ATTRIBUTE DESCRIPTION
usemap names the full image to be used
coords coordinates of the shape in pixels (depends on shape
attribute)
href URL associated with area
nohref placeholder for areas not associated with URL
shape shape of defined area
alt alternate text for area
title important to indicate to the user that the image is mapped.
text instruction accompanying the image
page 57