Hyperlinks Anchor Tags
Hyperlink (aka Link) Text (or image) user can click Takes user to different location In general, location can be: On same page A different page in same site A page outside the site Email software on user’s computer
Linking to Locations on SAME Page Bookmarks & ID’s
Step 1: ID’s Select location that you want to link to Find tag near it Place an id attribute inside that tag value must be unique Start with letters, no symbols, no spaces ID – cannot be repeated for more than 1 element/tag on the same page
href = hypertext reference Step 2: Create Link Link can be any part of a page – within lists, within p tags, etc. Surround text (or image) with a tags href = hypertext reference #nameOfIDtoLinkTo
Demo
Effect of Bookmarks Scrolls page as far up as possible to move ID location to the top If page is short, will not move location all the way up Really only makes sense for very long pages