XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted...
-
Upload
kory-simpson -
Category
Documents
-
view
212 -
download
0
Transcript of XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted...
![Page 1: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/1.jpg)
XHTML
Hyperlinks
![Page 2: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/2.jpg)
Creating Links to Other Web Pages A link, or hyperlink, is a specially
formatted Web page object that the user can click to open a different Web page, known as the target.
![Page 3: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/3.jpg)
Creating Links to Other Web Pages Links are created using the anchor
tag pair. <a> … </a>
![Page 4: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/4.jpg)
Creating Links to Other Web Pages Type of links:
external• file located on a network, such as the
Internet• file in the same location as the current file
internal (jump link) e-mail
![Page 5: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/5.jpg)
External Links Example 1<a href=“http://www.garlandisd.net”>GISD</a>
Example 2<a href=“page2.htm”>Page 2 of My Site</a>
![Page 6: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/6.jpg)
Internal Links (Jump Links)Part 1: href=”#linkname” Links different parts of your HTML document. “linkname” is the name of the section you are jumping or linking to.
<a href=”#top”>Top of Page</a>
Part 2: name=”????”
Marks the place or point on the page where you want the browser to jump to. “????” is the name you assign to the location in the document.
<a name=”top”></a>
![Page 7: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/7.jpg)
E-mail Links E-mail links require using mailto: in
front of the e-mail address on the href attribute.
Example:<a href=“mailto:[email protected]”>Mrs. Stair’s
Email Address</a>
![Page 8: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/8.jpg)
Absolute vs. Relative Links An absolute link includes the page’s
full Web site location and directory information.
Absolute links should only be used when linking to another site<a href=http://www.w3schools.com> Tutorials </a>
![Page 9: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/9.jpg)
Absolute vs Relative Link A relative link, on the other hand,
includes only the information about the target page’s location relative to the current Web page.
Allows entire sites to be moved without breaking links.<a href=“page2.htm”><a href=“folder/page5.htm><a href=“../index.htm”>
![Page 10: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/10.jpg)
Linking Graphics To link a graphic, surround the <img /> tag with the <a>..</a> tag
pair referencing the target Web page.
![Page 11: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/11.jpg)
Linking Graphics
Example:<a href=“index.htm”><img
src=“house.jpg” /></a>Displays a photo of a house that will take the user to the home page after they click the house photo.
![Page 12: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/12.jpg)
Linking Graphics
Linked graphics display by default with a blue border
Blue border provides a clue to users that the image contains a link
![Page 13: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/13.jpg)
Linking Graphics
A user can test a graphic by moving the mouse pointer over it – the pointer changes to a pointing hand if the image is formatted with a link.
![Page 14: XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.](https://reader036.fdocuments.us/reader036/viewer/2022083008/56649f155503460f94c2a282/html5/thumbnails/14.jpg)
Assignment Creating Links worksheet Refer to the pages on Hyperlinks in
the notebooks for help