Loading...
Loading exercise code...

Objectives

In this exercise, you will:

  • Learn the <a> (anchor) tag for creating hyperlinks
  • Understand different link attributes (href, target, title)
  • Practice linking to external and internal pages
  • Learn how to embed media like videos and iframes
  • Practice styling links with CSS

What You’ll Learn

The Anchor Tag:

  • <a href="..."> - Makes clickable links
  • href - The URL to navigate to
  • target="_blank" - Opens link in new tab
  • target="_self" - Opens in same tab (default)
  • title="..." - Tooltip text on hover

Common Link Types:

  • External links - Link to other websites
  • Internal links - Link to other pages on your site
  • Email links - href="mailto:email@example.com"
  • Anchor links - Link to sections: href="#section"

Embedded Media:

  • <iframe> - Embed external content like YouTube videos
  • Attributes: width, height, src, title

Challenges in This Exercise

  1. Add social media links - Uncomment and customize the social links
  2. Fix the video embed - Ensure the YouTube iframe is displaying correctly
  3. Add new sections - Create more profile sections with links

Tips for Success

  • Always use target="_blank" for external links
  • Use meaningful link text (avoid “Click here”)
  • Test all links work before publishing
  • Style links with :hover in CSS for better UX
  • Validate that iframe embeds are from trusted sources

Next Steps

After completing this exercise:

  1. Add more social media links
  2. Practice linking to different sections of a page
  3. Try embedding different types of content
  4. Move on to the Tables exercise!