Part 9: Mastering Hyperlinks & Site Navigation
Senior Full-Stack Developer
The anchor element for hyperlinks
The <a> (anchor) tag creates hyperlinks that connect web pages and resources. It's the foundation of web navigation.
This is how links appear to users
Understanding link behavior
Links flow with text content
Responds to clicks and hover
Must have destination URL
Keyboard navigable and screen reader friendly
href attribute - specifies the destinationSpecifies the link destination
Controls where link opens
_self: Same tab/window (default)_blank: New tab/window_parent: Parent frame_top: Full windowAdditional information tooltip
Defines relationship to target
nofollow: Don't pass SEO valuenoopener: Security for _blank linksnoreferrer: Hide referrer informationexternal: Link to external siteForces file download instead of opening
Special protocols for email and phone
CSS styling and class names
Links within the same website
Links to other websites
Define target sections with id attributes
Create links that jump to sections
CSS for smooth anchor navigation
This is the first section. Anchor links jump directly to this content.
This is the second section. Notice how the URL changes when you click the links.
This is the third section. Anchor links are great for long pages and documentation.
Organize links logically from most to least important
Keep navigation in the same location across pages
Use descriptive text that makes sense out of context
Ensure navigation works on all screen sizes
This is a paragraph with an inline text link that has a custom underline effect.
You've Learned HTML Links & Navigation
Anchor element for hyperlinks
Link destination URL
Controls where link opens
Internal, external, anchor links
Building navigation bars
CSS for link appearance
Build a multi-page website with comprehensive navigation:
Use descriptive link text that makes sense out of context
Make links visually distinguishable from regular text
Use rel="noopener noreferrer" for external _blank links
Ensure links are tappable on touch devices
Next: Learn about creating forms, input fields, and user interaction