Sunday, 8 February 2015

TASK: EXERCISE 5.1: LINKING TOW GAPES

TASK: EXERCISE 5.1: LINKING TOW GAPES
Create two HTML pages and save them in separate files. Here’s the code for the two HTML files I created for this section, which I called menu. Html, and Claudius. Html. What your two pages look like or what they’re called really doesn’t matter. However, make sure that you insert your own filenames if you’re following along with this example.
The following is the first file, called menu. Html:
< !DOCTYPE HTML PUBLIC “-/W3c//DTD XHTML 1.0 transitional..EN”
<html>
<head>
<title> the twelve caesars </title>
</head>
<body>
<h1>”the twelve caesars” by Suetonius</h1>
<p> Seutonius (or Gaius Suetonius Tranquillus) was born circa A.D. 70 and died sometime after A.D. 130. He composed a history of the twelve significant contribution  to the best –selling novel and television series “I, Claudius,” Suetonius’ work includes biographies of the following roman emperors: </p>.
<u1>
<l1> Julius Caesar </l1>
<l1>  Augustus</l1>
<l1>Gaius (Caligula) </l1>
<l1>Claudius</l1>
<l1>Nero</l1>
<l1>Galba</l1>
<l1>Otho</l1>
<l1>Vitellius</l1>
<l1>Vespasian</l1>
<l1>Titus</l1>
<l1>Domitian</l1>
</u1>
</body>

</html>
The list of menu items (Julius Caesar, Augustus, and so on). Will be links to other pages. For now, just type them as regular text; you
You’ll turn them into links later.
< !DOCTYPE HTML PUBLIC “-/W3c//DTD XHTML 1.0 transitional..EN”
<html>
<head>
<title> the twelve Caesars </title>
</head>
<body>
<h2> Claudius becomes emperor</h2>
<p> Claudius became emperor at the age of 50. Fearing the attack of Caligula’s assassins, Claudius hid
Behind some curtains. After a guardsman discovered him, Claudius dropped to the floor, and then found himself declared emperor, </p>
<h1> Claudius is poisoned</h2>.
<p> Claudius is poisoned </h2>
<p> most people think that Claudius was poisoned. Some think his wife Agrippina poisoned a dish of mushrooms (his favorite food). His death was revealed after arrangements had been made for her son, Nero, to succeed as emperor. </p>
<p> go back to main menu</p>
</body>
</html>
Make sure that both of your files are in the same directory of folder. If you haven’t called them menu. Html and Claudius. Html, make sure that you take note of the names because you’ll need them later.
Create a link from the menu file to the feeding file. Edit the menu. Html file, and put the cursor at the following line:
<1i>Claudius</1i>
Link tags don’t define the format of text itself, solve in the list item tags and just add the link inside the item. First, put in the link tags themselves (the <a> and </a> tags) around the text that you want to use as the link:
<1i><a>Claudius</a><1i>
Now add the name of the file that you and to link to as the href part of the opening link tag. Enclose the name of the file in quotation marks (straight quotes [“], not curly or typesetter’s quotes [“], with an equal sign between href and the name, filenames in links are case sensitive, so make sure that the filename in the link is identical to the name of the file you created. (Claudius. Html is not the same file as Claudius. Html; it has to be exactly the same case.) here I’ve used Claudius. Html; if you used different files, use those filenames.
<1i><a href=”Claudius. Html”> Claudius</1i>
Now, start your browser, select open file (or its equivalent in your browser), and open the menu. Html file. The paragraph you used as your link should now show up as a link that is in a different color, underline, otherwise highlighted. Figure 5.3 shows how it looked when I opened it.

No comments:

Post a Comment