HTML and CSS Reference
In-Depth Information
Chapter 6
Linking the Web
It's not entirely hyperbole when we tell you that links are the most important element in HTML. Without the
ability to link from one document to another, the Web wouldn't be the Web. The “H” in “HTML,” hypertext,
becomes meaningless without the concept of linked documents. Links are the thread that binds the
tapestry of the Web together. They allow us, for better or for worse, to spend hours reading articles on
Wikipedia, diving into one topic and falling out the other side of a completely different topic. Links are
beautiful in their simplicity and awesome in their power.
In this chapter, you'll learn about anchors and their many useful attributes and characteristics. We'll also
introduce you to the image map. Over the course of the chapter, there will be plenty of code examples,
tips, and tricks. Lastly, we'll show you some common CSS techniques you can employ to spruce up your
links.
Anchors
Linking the Web begins with the a , or anchor, element, one of the oldest elements—perhaps the oldest
element—in HTML. If you take a look at the oldest known HTML document on the Web, still available at
www.w3.org/History/19921103-hypertext/hypertext/WWW/Link.html , y ou'll see that the page
includes three elements: title , h1 , and a . Functioning hyperlinks were a key component of the Web from
the very start!
That page, created by Tim Berners-Lee while in the midst of inventing the Web, amazingly still renders
properly in modern browsers. Even in this primordial form, HTML differentiated itself from SGML, the
arcane language from which it was loosely derived, by including a facility for linking documents. SGML,
 
Search WWH ::




Custom Search