- Hyperlinks <a> are what makes the Web a web
- Allow random navigation
- Syntax: <a attributes>
The href attribute
- Relative URL (within site):
- href="7.html" same folder
- href="../8-1/7.html" up a folder, down into a folder
- href="../angry.html" up a folder
- Absolute URL (from site root):
- href="/common/syllabus.pdf"
- Fully-Qualified URL (outside the site):
- href="http://www.google.com"
- The name attribute
(anchor - specific location on a page)
- <a name="top"> is a bookmark
- Reference bookmarks by using a pound sign:
- <a href="#top">Back to top</a>
- Also in URLs: http://www.site.com/page.html#3
- The target attribute
- Targets designate which window loads the href
- <a href="14.html" target="_blank">new window</a>
- <a href="14.html" target="_parent">frameset parent
- <a href="14.html" target="_self">same window
- <a href="14.html" target="_top">topmost window
- <a href="14.html" target="FRED">named window