In the last line (the see also,), linking the composer names to their respective sections elsewhere in the reference would be useful. If you use the procedure you learned earlier today, you can create a link here around the word Byrd to the page b.html. when your readers select the link tob.html, the browser drops them at the top of the Bs. Those hapless readers them have to scroll down through all the composers whose names start with B(and there are many of them: Bach, Beethoven, Brahms, Bruckner) to get to Byrd lot of work for a system that claims to link information so that you can find what you want quickly and easily.
What you want is to be able to link the word Byrd in m.html directly to the section for Byrd in bn.html. here’s there Levant part of b.html you want to link. (I’ve deleted all the be before bard to make the file shorter for this example. Pretend they’re still there.).
NOTE
In this example, you’ll see the use of the<Em> tag. This tag is used to specify text that should ne emphasized. The emphasis usually is done by rendering the text italic in nets cape and internet explorer.
< ! DOCTYPE HTML PUBLIC “-/W3c//DTD XHTML 1.0 transitional..EN”
http://www.w3.org/Tr/xhtml 1/DTD/transitional.dtd>
<html>
<head>
<title> CLASSICAL MUSIC: </title>
<title>classical music: B<title>
</head>
<body>
<h1>B</h1>
<!---I’ve deleted all the Bs before Byrd to make things shorter-->
<h2><a name=”Byrd, William, 1543-1623</a></h2>
<u1>
<1i><Em>this sweet and merry month of may</Em></1i>
<1i><Em>though amaryllis dance</Em></1i>
<1i><Em>Lullabies, My sweet little Baby</Em></1i>
</u1>
</1i>
<1i>masses
<u1>
<1i><Em> mass for five voices </Em><1i>
<1i><Em> mass for four voices </Em><1i>
<1i><Em> mass for three voices </Em><1i>
</u1>
</1i>
<1i>motets
(u1>
<l=1i><Em>Ave verum corpus a 4<</Em></1i>
</u1>
</1i>
</u1>
<p><Em>see Also</Em> madrigals, masses, motets </p>
</body>
</html>
You’ll need to create an anchor at the section heading for Byrd. You then can link to that anchor from the see also in the file for M.
As I described earlier today, you need two elements for each anchor: an anchor name and the text inside the link to hold that anchor (which might be high knighted in some browsers). The later is easy; the section heading itself works well because it’s the element to which you’re actually linking.
You can choose any name you want for the anchor, but each anchor in the page must be unique. (if you have who or more anchors with the name Fred in the same page, how would the browser know which one to choose when a link to that anchor is selected?0 a good, unique anchor make for this example is simply Byrd because Byrd can appear only one place in the file, ad file, and this is it.
After you’ve decided on the two parts, you can create the anchor itself in your HTML file. Add the , <a> tag to the William Byrd section heading, but be careful here. If you were working with normal text within a paragraph, you’d just surround the whole line with <A> . But when you’re adding an anchor to a big section of text that’s also contained within an element –such as a heading or paragraph-always put the anchor inside the element. In other words, enter
<h2><a name=”Byrd”>Byrd, William, 1543-1623</a></h2>
But do not enter
<a name=”Byrd”><Byrd, William, 1543-1623,/h2></a>
The second example can confuse your browser. Is it an anchor, formatted just like the text before it, with mysteriously placed heading tags? Or is it a heading that also happens to be an anchor? If you use the right code in your HTML file, with the anchor inside the heading, you avoid the confusion. The easiest answer is probably just puttying the anchor ahead of the heading tag, like this:
<a name=<Byrd”></a>
<h2>Byrd, William, 1543-1623</h2>
If you’re still confused, refer to appendix B, “which has a summary of all the HTML tags and rules for which tags can and cannot go inside each one.
So, you’ve added your anchor to the heading and its name is “Byrd”, Now go back to the see also line in your m.html file:
<p><Em>sec also</Em>
Byrd, Gibbons, Lass us, Monteverdi, Morley, Weeklies, Will by</p>
You’re going to create your link here around the word Byrd, just as you would for any other link. But what’s the URL?As you learned previously, pathnames to anchors look similar to the following.
Page-Name # anchor-name
If you’re creating a link to the b.html page itself, the href is as follows:
<a href=”b.html”>
Because you’re linking to a section inside that page, ad the anchor name to link that section so that it looks like this:
<a href=”b. html# Byrd”>
Note the small b in Byrd. Anchor names and links are case sensitive; if you put # Byrd in your href, the link might not work properly. Make sure that the anchor name you use in the name attribute and the anchor name in the link after the #are identical.
No comments:
Post a Comment