Review for
W23c: Links and Images and (X)HTML
OBJECTIVES
----------
A. Purpose of an (X)HTML link
B. Purpose of the parts of an (X)HTML link
C. Target parameter and its major options
D. Various types of links that can be made
E. Purpose of an (X)HTML anchor
F. Syntax of an (X)HTML anchor
G. (X)HTML Image tag and its parts
H. Parameters to the Image tag setting height, width, and
alternate message
I. Parameter for assigning a background image to the Body tag.
QUESTIONS
---------
1. What is the purpose or function of an (X)HTML link? [W23cA1s]
2. What is the tag used to create links? [W23cB1s]
3. What is the attribute that makes an anchor tag into a link
[W23cB2s]
4. What is enclosed between the opening and closing of a linking
anchor element? [W23cB3s]
5. What is the purpose of the "target" attribute in an anchor
tag? [W23cC1s]
6. Name any three of the target attribute's predefined
parameters: [W23cC2s]
7. In addition to the http protocol links, most browsers can
link using other protocols. Name three of those
protocols: [W23cD1s]
8. Write the code for a link that enables the user to download
the file at ftp.oregonstate.edu/pub/php/robots.txt.
[W23cD2s]
Download
9. Write the code for a link that opens a Telnet link to
orchard.wccnet.edu
[W23cD3s]
10. Write the code for a link to send email to
santa@northpole.com. [W23cD4s]
11. What is the purpose of an (X)HTML anchor? [W23cE1s]
12. Write code for an anchor marking a spot called
"beansprouts": [W23cF1s]
13. Write code linking within a document to an anchor
called "beansprouts": [W23cF2s]
14. Write code to display an image named "carrots.gif" in the
current directory: [W23cG1s]
15. To the code displaying "carrots.gif", add an attribute
giving the alternate text, "Rabbit food":
[W23cH1s]
15. To the code displaying "carrots.gif", add attributes
giving the wdith as 20 pixels and the height as
40 pixels:
[W23cH2s]
16. Code a body tag assigning "clouds.jpg" as background image:
[W23cI1s]
ANSWERS
-------
1. A link allows other files or services to be opened by
the user agent (browser) [W23cA1s]
2. The anchor tag is used to create links. [W23cB1s]
3. href is the attribute that makes an anchor tag into a link.
[W23cB2s]
4. The linked object or text. [W23cB3s]
5. It opens the file in a separate window. [W23cC1s]
6. Any of the following: _blank, _self, _parent, _top [W23cC2s]
7. Any three of these: FTP, email, Telnet, Gopher [W23cD1s]
8. Download
[W23cD2s]
9. Telnet to Orchard
[W23cD3s]
10. Send Email to Santa
[W23cD4s]
11. Anchors allow hyper-references to locations within
(X)HTML documents. [W23cE1s]
12. [W23cF1s]
13. See Beansprouts [W23cF2s]
14.
[W23cG1s]
15.
[W23cH1s]
15.
:
[W23cH2s]
16.