<a> taghref attribute to create a hypertext
link to another place in the same document or to another
document.href used to specify the URL of the
target of the link.See <a href="http://www.math.ucla.edu">
UCLA Math Dept.</a> for more details.Back to
<a href="handouts/htmlintro.html">Introduction
to HTML<a/>id attribute (associated with headings, paragraphs,
lists, etc.)<h2 id="hyperlinks">Creating Hyperlinks</h2>Back to <a href="#hyperlinks">Creating Hyperlinks</a>
See <a href="links.html#hyperlinks">Creating Hyperlinks</a>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>My favorite</title></head>
<body>
<h2>My favorite web sites</h2>
<a href="http://www.cnn.com">CNN</a><br />
<a href="http://www.latimes.com">LA times</a>
</body>
</html>
|
My favorite web sitesCNNLA times |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Car</title></head>
<body>
<h2>Cars</h2>
Click the icon to <i>cars.com</i>
<a href="http://www.cars.com"><img src="cars.gif" alt="car" /></a>
</body>
</html>
|
CarsClick the icon to cars.com
|
<h2 id="reading">Reading</h2> Click <a href="#reading">here</a> to go to the Reading section. |
| Click here to go to the Reading section. |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Link</title></head>
<body>
<a href="index2.html">Link index2.html</a>
</body>
</html>
|
| Link index2.html |