[an error occurred while processing this directive]
Go to Bottom Nav - January 24, 2018 - No exercises at this time - ERRORblah Happy Holidays and Semester Break!

The Anchor tag is one of the most powerful tags you will use. The biggest use is to make some text or an image into a hyperlink which is one of the compelling features of the internet. The anchor tag may also be used to mark a specific place vertically on a page and a hyperlink is used to take you there. Perhaps another page, or in this case, somewhere on the same page.

The anatomy of an anchor tag is like any other tag, including name, attribute and value. Let’s have a look at a link to Yahoo:

< a   href= "http://www.yahoo.com" > Go to Yahoo! </a>
1 2 3 4 5 6 7 8
  1. Opening Bracket
  2. "a" for anchor, the tag name
  3. The ever important space
  4. attribute, href could be thought of as hyper-reference
  5. The value of the attribute, either absolute path (URL) or relative path. This is the address you are linking to.
  6. Closing bracket
  7. Text or image that appears as the visible hyperlink on the page.
  8. Closing anchor tag

Use the anchor tag to surround text or images that you wish to be a link. It can be confusing though, if you make too much text at once into a link. All that blue and underlining are just too much for the eye (if you know what I mean). Kind of annoying to the eye. OK, I'll stop now.

Anchor tags are also used to define or mark a particular place on the page. In the hyperlink example above (there), the link goes to an anchor at the bottom of the page which looks like this: <a name="bottom"></a>. You will see the name attribute in xHTML and earlier; HTML5 uses the id attribute. The name attribute is depricated for HTML5 pages and will produce a validation error.

Like the bottom of the page! Back to the top...

Heading One
Ut pharetra, ante eget imperdiet ullamcorper, tortor nunc sollicitudin orci, non cursus neque nisl eget ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vestibulum, nibh in suscipit interdum, velit magna volutpat turpis, at ornare sem magna et tellus. Sed pulvinar facilisis ligula, id vehicula eros sollicitudin a. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Heading Two
Vivamus vestibulum, augue id iaculis sodales, odio odio feugiat arcu, scelerisque congue nisi ipsum vitae orci. Nunc sed ligula quam. Cras sed iaculis neque. Proin ultricies consectetur tortor, eu pulvinar sapien commodo ac. Cras diam arcu, lacinia id mattis ut, convallis sed massa. Nullam ut arcu lacus. Suspendisse ultricies elementum arcu ut dictum.
Heading Three
Sed aliquet augue ut ligula porta gravida pellentesque sapien semper. Duis mauris massa, semper pulvinar eleifend id, tincidunt fermentum nulla. Proin ipsum neque, imperdiet in vestibulum non, hendrerit ac nisi. Maecenas eleifend libero quis urna lacinia elementum. Etiam mi massa, sollicitudin nec accumsan in, aliquet in dui. Pellentesque consequat diam quis felis luctus a vehicula lectus mollis.
Pull Down Menu Close Menu