Coding Links: Images & Page Jumps
Master HTML linking fundamentals with practical exercises
Key Linking Concepts Covered
Relative URLs
Link to pages within your site using simple file names. Perfect for internal navigation and maintaining site structure.
Image Links
Wrap anchor tags around images to create clickable visual elements. Essential for logos and interactive graphics.
External Links
Connect to other websites using full URLs with proper protocols. Control whether links open in new tabs or windows.
Page Jumps
Create internal navigation using IDs to jump to specific sections. Improve user experience on long pages.
File Setup Process
Clean Workspace
Close any open files and navigate to Desktop > Class Files > Web Dev Class. Delete existing Revolution Travel folder if present.
Duplicate Source Files
Find and duplicate the 'Revolution Travel Ready for Links' folder to create your working directory.
Rename Folder
Rename the duplicated folder to 'Revolution Travel' to match the expected project structure.
Select text you want to wrap, hit Option-W (Mac) or ALT-W (Windows), type the tag name (like 'a' for anchor), and press Enter. This dramatically speeds up your HTML coding workflow.
Navigation Structure
Featured Location
Links to sanfran.html - the current page showcasing San Francisco attractions and activities.
Tour Packages
Links to packages.html - displays available travel packages and pricing options.
Travel Tips
Links to tips.html - provides helpful advice and recommendations for travelers.
About & Contact
Links to about.html and contact.html - company information and communication channels.
Web users expect clicking a site's logo to return them to the homepage. This is a universal design pattern that should be implemented on every website for optimal user experience.
Target Attribute Considerations
External Link Destinations
Alcatraz Cruises
Official site for booking tours to the famous former prison island. Links to alcatrazcruises.com with target blank.
Fisherman's Wharf
Tourist destination website featuring attractions, dining, and shopping information at fishermanswharf.org.
Blazing Saddles
Bike rental company website for exploring San Francisco on two wheels at blazingsaddles.com.
Creating Page Jump Navigation
Add ID Attributes
Add unique ID attributes to target sections: alcatraz, wharf, biking, and tips. These serve as anchor points for navigation.
Create Jump Links
Wrap text in anchor tags with href values pointing to the IDs using # symbol. For example, href='#alcatraz' jumps to the alcatraz section.
Add Back to Top Links
Create return navigation using href='#' which automatically jumps to the top of the document without needing a specific ID.
In Visual Studio Code, use Selection > Select All Occurrences to edit multiple identical text elements simultaneously. Perfect for wrapping multiple 'Back to Top' links at once.
Key Takeaways
