Stage 2: Frontend Fundamentals

HTML · Lesson 03

Links and Images

Anchor tags, image elements, alt text, and the difference between absolute and relative paths.

HTML4 min readFree lesson

Learn how to create links that connect web pages and how to insert images.


The <a> tag creates a hyperlink that navigates to another page, to a specific location on the same page, to a file, or to an email address.

Basic Usage

<a href="address to navigate to">link text</a>

href Attribute (Hypertext Reference)

<!-- Link to an external website -->
<a href="https://www.naver.com">Naver</a>

<!-- Another HTML file in the same folder -->
<a href="about.html">About Page</a>

<!-- A file in the parent folder -->
<a href="../index.html">Back to Home</a>

<!-- A specific location on the page (anchor link) -->
<a href="#section2">Go to Section 2</a>
<h2 id="section2">Section 2</h2>

<!-- Email link -->
<a href="mailto:[email protected]">Send an Email</a>

<!-- Phone link (opens the phone app when tapped on a mobile device) -->
<a href="tel:+15551234567">+1 (555) 123-4567</a>

target Attribute - How the Link Opens

<!-- Open in the current tab (default) -->
<a href="https://www.google.com" target="_self">Google (current tab)</a>

<!-- Open in a new tab -->
<a href="https://www.google.com" target="_blank">Google (new tab)</a>

rel Attribute - Declaring the Link Relationship

<!-- When opening in a new tab, rel="noopener noreferrer" is recommended for security -->
<a href="https://www.google.com" target="_blank" rel="noopener noreferrer">
  Google (opened safely in a new tab)
</a>

Security note: When you use target="_blank", always use rel="noopener noreferrer" together with it.
If you leave it out, the page you opened may be able to manipulate the original page, which creates a security vulnerability.


2. Image Tag (img)

The <img> tag inserts an image. It is a void element, so it has no closing tag.

Basic Usage

<img src="image path" alt="image description">

Key Attributes

<!-- src: path to the image file (required) -->
<!-- alt: alternative text describing the image (required) -->
<img src="photo.jpg" alt="Photo of Namsan Tower in Seoul">

<!-- width, height: image size (pixels or percentages) -->
<img src="logo.png" alt="Company logo" width="200" height="100">

<!-- If you set only the width, the height is adjusted automatically to keep the aspect ratio -->
<img src="banner.jpg" alt="Banner image" width="800">

Why the alt Attribute Matters

<!-- alt matters in three situations -->

<!-- 1. When the image fails to load: the alt text is shown instead -->
<img src="missing-file.jpg" alt="Photo description">

<!-- 2. Screen readers: the tools used by visually impaired people read the alt text aloud -->
<img src="chart.png" alt="Graph showing revenue growth in the first quarter of 2026">

<!-- 3. SEO: search engines understand what the image shows from the alt text -->

<!-- For purely decorative images, leave alt empty -->
<img src="decoration.png" alt="">

3. Absolute Paths vs Relative Paths

Absolute Path

<!-- Internet URL (external image) -->
<img src="https://www.example.com/images/photo.jpg" alt="External image">

<!-- Path starting from the server root -->
<img src="/images/logo.png" alt="Logo">

Relative Path

The path is calculated from the location of the current HTML file.

project/
├── index.html          ← current file
├── about.html
├── images/
│   ├── logo.png
│   └── banner.jpg
└── pages/
    └── contact.html
<!-- An image in the images folder, referenced from index.html -->
<img src="images/logo.png" alt="Logo">
<img src="images/banner.jpg" alt="Banner">

<!-- A file in the same folder, referenced from index.html -->
<a href="about.html">About</a>

<!-- A file in a subfolder, referenced from index.html -->
<a href="pages/contact.html">Contact</a>

<!-- An image in the parent folder, referenced from pages/contact.html -->
<img src="../images/logo.png" alt="Logo">
<!-- ../ means the parent folder -->

4. figure and figcaption

These tags group an image and its caption (description) in a meaningful way.

<figure>
  <img src="https://picsum.photos/400/300" alt="Random landscape photo">
  <figcaption>Photo 1: A beautiful natural landscape (source: Lorem Picsum)</figcaption>
</figure>
<!-- You can also group several images into a single figure -->
<figure>
  <img src="before.jpg" alt="Before the change">
  <img src="after.jpg" alt="After the change">
  <figcaption>Website redesign: before and after comparison</figcaption>
</figure>

<!-- You can group code in a figure as well -->
<figure>
  <pre><code>
    function hello() {
      console.log("Hello!");
    }
  </code></pre>
  <figcaption>Example 1: An example of a JavaScript function declaration</figcaption>
</figure>

If you put an <img> inside an <a> tag, it becomes a clickable image link.

<!-- Clicking the image navigates to that page -->
<a href="https://www.google.com" target="_blank" rel="noopener noreferrer">
  <img src="google-logo.png" alt="Go to the Google homepage">
</a>

Summary

Tag/Attribute Description
<a> Hyperlink
href Destination (URL, file path, #id, mailto:, tel:)
target="_blank" Open in a new tab
rel="noopener noreferrer" Security setting for new tabs
<img> Inserts an image (void element)
src Image path
alt Alternative text for the image
width, height Image size
<figure> Groups an image or other media with its caption
<figcaption> The caption of a figure
Absolute path Starts with / or https://
Relative path Based on the current file location (./, ../)

Next Steps

  • Example file - Portfolio gallery example
  • Check the assignment - Build a bookmarks page
  • Next lesson: Tables

Example files

Complete, runnable files used in this lesson. Copy them into your project and experiment.

gallery.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>John Doe's Portfolio Gallery</title>
</head>
<body>

  <h1>John Doe's Portfolio</h1>
  <p>Hello! I'm John Doe, and I'm studying web development.</p>

  <!-- ====== Collection of social links ====== -->
  <h2>My Channels &amp; Links</h2>

  <ul>
    <!-- For external links, use target="_blank" and rel="noopener noreferrer" together -->
    <li>
      <a href="https://github.com" target="_blank" rel="noopener noreferrer">
        GitHub - Code repository
      </a>
    </li>
    <li>
      <a href="https://www.linkedin.com" target="_blank" rel="noopener noreferrer">
        LinkedIn - Professional profile
      </a>
    </li>
    <li>
      <a href="https://www.youtube.com" target="_blank" rel="noopener noreferrer">
        YouTube - Tutorial channel
      </a>
    </li>
    <li>
      <!-- Using mailto: opens your email app -->
      <a href="mailto:[email protected]">Send an email: [email protected]</a>
    </li>
    <li>
      <!-- Using tel: opens the phone app on a mobile device -->
      <a href="tel:+15551234567">Phone: +1 (555) 123-4567</a>
    </li>
  </ul>

  <!-- ====== In-page navigation ====== -->
  <h2>Gallery Contents</h2>
  <ul>
    <!-- The href="#id" format jumps to a specific location on the same page -->
    <li><a href="#nature">Nature Photos</a></li>
    <li><a href="#city">City Photos</a></li>
    <li><a href="#abstract">Abstract Images</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>

  <hr>

  <!-- ====== Nature photo gallery ====== -->
  <!-- The anchor link above jumps to this spot through id="nature" -->
  <h2 id="nature">Nature Photos</h2>

  <!-- figure: a tag that groups an image and its caption in a meaningful way -->
  <figure>
    <!-- Using an online image URL. alt is text that describes what the image shows -->
    <img
      src="https://picsum.photos/seed/forest/600/400"
      alt="Trees in a dense forest glowing as the light falls through them"
      width="600"
    >
    <!-- figcaption: the description (caption) of the figure element -->
    <figcaption>Photo 1: A forest with light filtering through (source: Lorem Picsum)</figcaption>
  </figure>

  <figure>
    <img
      src="https://picsum.photos/seed/mountain/600/400"
      alt="Snow-covered mountain peaks under a blue sky"
      width="600"
    >
    <figcaption>Photo 2: Morning on a snowy mountain (source: Lorem Picsum)</figcaption>
  </figure>

  <figure>
    <img
      src="https://picsum.photos/seed/ocean/600/400"
      alt="The sea and its waves glowing in the light of the setting sun"
      width="600"
    >
    <figcaption>Photo 3: The sea at dusk (source: Lorem Picsum)</figcaption>
  </figure>

  <!-- A link that moves to the top of the page -->
  <p><a href="#">Back to top</a></p>

  <hr>

  <!-- ====== City photo gallery ====== -->
  <h2 id="city">City Photos</h2>

  <figure>
    <img
      src="https://picsum.photos/seed/city1/600/400"
      alt="A city skyline glowing with bright lights at night"
      width="600"
    >
    <figcaption>Photo 4: City skyline at night (source: Lorem Picsum)</figcaption>
  </figure>

  <figure>
    <img
      src="https://picsum.photos/seed/building/600/400"
      alt="The exterior of a modern glass high-rise building"
      width="600"
    >
    <figcaption>Photo 5: Modern architecture (source: Lorem Picsum)</figcaption>
  </figure>

  <!-- Linking an image - clicking the image navigates to that site -->
  <figure>
    <a href="https://unsplash.com" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/bridge/600/400"
        alt="A large suspension bridge crossing the city (click to visit Unsplash)"
        width="600"
      >
    </a>
    <figcaption>Photo 6: Suspension bridge (click to visit the Unsplash website)</figcaption>
  </figure>

  <p><a href="#">Back to top</a></p>

  <hr>

  <!-- ====== Abstract image gallery ====== -->
  <h2 id="abstract">Abstract Images</h2>

  <!-- Setting both width and height can change the aspect ratio -->
  <!-- Setting only the width adjusts the height automatically to keep the ratio -->
  <figure>
    <img
      src="https://picsum.photos/seed/abstract1/600/600"
      alt="An abstract pattern in many colors"
      width="400"
      height="400"
    >
    <figcaption>Image 7: Colorful abstract pattern (400x400 pixels)</figcaption>
  </figure>

  <figure>
    <img
      src="https://picsum.photos/seed/texture/600/400"
      alt="The rough texture of stone or concrete"
      width="600"
    >
    <figcaption>Image 8: Natural texture (600px wide, height automatic)</figcaption>
  </figure>

  <p><a href="#">Back to top</a></p>

  <hr>

  <!-- ====== Contact section ====== -->
  <h2 id="contact">Contact</h2>

  <p>If you are interested in my work or would like to collaborate, please get in touch below:</p>

  <ul>
    <li>
      Email:
      <a href="mailto:[email protected]?subject=Portfolio%20inquiry">
        [email protected]
      </a>
      <!-- The format mailto:email?subject=title lets you set the email subject in advance -->
    </li>
    <li>
      GitHub:
      <a href="https://github.com" target="_blank" rel="noopener noreferrer">
        github.com/johndoe
      </a>
    </li>
    <li>
      Phone:
      <a href="tel:+15551234567">+1 (555) 123-4567</a>
    </li>
  </ul>

  <!-- Example of a relative-path link that moves from this page to another HTML file -->
  <p>
    <a href="../example/gallery.html">Back to the gallery home</a> |
    <a href="../lesson-01-html-basics/example/index.html">View the Lesson 01 example</a>
  </p>

  <p><a href="#">Back to top</a></p>

</body>
</html>

Assignment

Lesson 03 Assignment - Build Your Own Bookmarks Page

Assignment Goal

Using link and image tags, create a bookmarks page that introduces
five sites you visit often.


Requirements Checklist

Links (a tag)

  • Include links to at least 5 sites
  • Use target="_blank" on every external link (open in a new tab)
  • Use rel="noopener noreferrer" on every external link (security)
  • Include 1 email link in mailto: format
  • Use at least 2 in-page anchor links (href="#id")
  • Include at least 1 link that goes back to the top of the page

Images (img tag)

  • Include a relevant image for each site introduction (online URLs are fine)
  • Write an alt attribute on every <img> tag (a meaningful description)
  • Set the image size with the width attribute
  • Include at least 1 image link that navigates to the site when the image is clicked

figure/figcaption

  • Group images with their descriptions using <figure> and <figcaption> (at least 3)

Structure

  • Divide the page into sections by category (use h2, e.g. News, Entertainment, Development)
  • Include a short description for each site (use p tags)
  • Separate the categories with <hr>

What to Include for Each Site

Include the following for every site:

  1. Site name (use an h3 tag)
  2. Site address (a link with an a tag)
  3. Site introduction (2-3 sentences with p tags)
  4. Featured image (img or figure+figcaption)
  5. Reason to recommend it (one line)

Category Examples

Build categories that match your own interests:

  • News / information sites
  • Entertainment / video
  • Shopping
  • Development / learning
  • Social media / communities
  • Hobbies

Hints

Hint 1: Creating an image link

To make a click on the image navigate to the site, put an <img> inside an <a> tag:

<a href="https://www.naver.com" target="_blank" rel="noopener noreferrer">
  <img src="https://picsum.photos/seed/naver/300/200" alt="Naver homepage (click to visit)">
</a>
Hint 2: Using anchor links

Create a table of contents at the top of the page so readers can jump straight to each section:

<!-- Table of contents at the top -->
<h2>Category Contents</h2>
<ul>
  <li><a href="#news">News Sites</a></li>
  <li><a href="#entertainment">Entertainment</a></li>
  <li><a href="#dev">Development Sites</a></li>
</ul>

<!-- Give each section an id -->
<h2 id="news">News Sites</h2>
...
<h2 id="entertainment">Entertainment</h2>
...
<h2 id="dev">Development Sites</h2>
Hint 3: Using online image URLs

You can use an online image service even if you don't have image files of your own:

<!-- Lorem Picsum: a site that provides random photos -->
<!-- https://picsum.photos/width/height -->
<img src="https://picsum.photos/400/250" alt="Random image">

<!-- With a seed, you always get the same image -->
<img src="https://picsum.photos/seed/naver/400/250" alt="Fixed random image">

<!-- Using a site favicon (icon) image -->
<img src="https://www.google.com/favicon.ico" alt="Google icon" width="32" height="32">
Hint 4: Example of the full page structure
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Bookmark Collection</title>
</head>
<body>

  <h1>My Bookmarks</h1>
  <p>Here are the sites I visit most often.</p>

  <!-- Table of contents -->
  <h2>Contents</h2>
  <ul>
    <li><a href="#news">News</a></li>
    <li><a href="#dev">Development</a></li>
    <li><a href="#hobby">Hobbies</a></li>
  </ul>

  <hr>

  <!-- News section -->
  <h2 id="news">News Sites</h2>

  <h3>Naver News</h3>
  <figure>
    <a href="https://news.naver.com" target="_blank" rel="noopener noreferrer">
      <img src="IMAGE_URL" alt="Naver News (click to visit)" width="400">
    </a>
    <figcaption>Naver News - the news service of the largest portal site in Korea</figcaption>
  </figure>
  <p>
    This is the news service of Naver, the largest portal site in Korea.
    You can read news from a wide range of categories in one place.
  </p>
  <p>Reason to recommend it: it is the fastest way to catch up on the most news</p>

  <p><a href="#">Back to top</a></p>
  <hr>

  <!-- The remaining sections... -->

</body>
</html>

File Name

Save your page as gallery.html.


Grading Criteria

Item Points
Links to 5 or more sites (including new-tab and security attributes) 25 points
Image insertion (including alt attributes) 20 points
Use of figure + figcaption (3 or more) 15 points
Image links (img inside an a tag) 10 points
Anchor links and table of contents 15 points
mailto: or tel: link 5 points
Category structure and completeness of content 10 points
Total 100 points
Show the reference solution

Try the assignment yourself first — comparing your attempt with a working solution is where most of the learning happens.

gallery.htmlHTML
<!DOCTYPE html>
<!-- HTML5 declaration: tells the browser that this document follows the HTML5 format -->
<html lang="en">
<!-- lang="en": sets the document language to English -->

<head>
  <meta charset="UTF-8">
  <!-- UTF-8 encoding so that no characters are garbled -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- Viewport settings for mobile screens -->
  <title>My Bookmark Collection</title>
  <!-- The title that appears in the browser tab -->
</head>

<body>

  <!-- ====== Page title ====== -->
  <h1>My Bookmarks</h1>
  <!-- h1: the main heading of the page (one per page is recommended) -->

  <p>
    I have organized the sites I visit most often by category.
    Click any site you are curious about and go straight to it!
  </p>

  <!-- ====== In-page table of contents ====== -->
  <h2>Category Contents</h2>
  <ul>
    <!-- The href="#id" format: moves to the element with that id on the same page -->
    <li><a href="#news">News &amp; Information</a></li>
    <!-- &amp;: the special character (HTML entity) used for the & symbol in HTML -->
    <li><a href="#dev">Development &amp; Learning</a></li>
    <li><a href="#entertainment">Entertainment</a></li>
    <li><a href="#shopping">Shopping</a></li>
    <li><a href="#contact">My Contact</a></li>
  </ul>

  <hr>
  <!-- hr: a horizontal line that visually separates the contents from the body -->

  <!-- ============================== -->
  <!-- Category 1: News & Information -->
  <!-- ============================== -->
  <!-- id="news": the anchor link <a href="#news"> above jumps to this spot -->
  <h2 id="news">News &amp; Information</h2>

  <!-- Site 1: Naver News -->
  <h3>1. Naver News</h3>

  <!-- figure: a semantic tag that groups an image and its caption in a meaningful way -->
  <figure>
    <!-- Putting img inside an a tag makes a click on the image follow the link -->
    <a href="https://news.naver.com" target="_blank" rel="noopener noreferrer">
      <!-- target="_blank": open in a new tab -->
      <!-- rel="noopener noreferrer": prevents the security weakness of opening a new tab -->
      <img
        src="https://picsum.photos/seed/newspaper/500/300"
        alt="Naver News - click to visit Naver News"
        width="500"
        <!-- alt: text that describes the image. It is shown when the image fails to load and is read by screen readers -->
        <!-- width: sets the image width in pixels (the height is adjusted automatically to keep the ratio) -->
      >
    </a>
    <!-- figcaption: the description or caption of the figure element -->
    <figcaption>Naver News - news from major press outlets in one place (click to visit)</figcaption>
  </figure>

  <p>
    This is the news service of Naver, the largest portal site in Korea.
    You can follow news in politics, business, society, culture and many other fields in real time.
    You can also subscribe to individual outlets, so you only see the stories you care about.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://news.naver.com" target="_blank" rel="noopener noreferrer">
      Go to Naver News →
    </a>
    The most accessible service for checking the news quickly and conveniently
  </p>

  <!-- Site 2: Wikipedia -->
  <h3>2. Wikipedia</h3>

  <figure>
    <a href="https://ko.wikipedia.org" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/encyclopedia/500/300"
        alt="Wikipedia - the free encyclopedia (click to visit Wikipedia)"
        width="500"
      >
    </a>
    <figcaption>Wikipedia - the free encyclopedia that anyone in the world can edit</figcaption>
  </figure>

  <p>
    Wikipedia is a free encyclopedia written together by volunteers from all over the world.
    Search for a topic you are curious about and you can find an enormous amount of information.
    The Korean-language edition holds more than about 600,000 articles.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://ko.wikipedia.org" target="_blank" rel="noopener noreferrer">
      Go to Wikipedia →
    </a>
    The best information site for gaining a vast amount of knowledge for free
  </p>

  <!-- A link that moves to the top of the page -->
  <p><a href="#">▲ Back to top</a></p>
  <!-- href="#" moves to the very top of the page -->

  <hr>
  <!-- hr: visually separates the categories -->

  <!-- ============================== -->
  <!-- Category 2: Development & Learning -->
  <!-- ============================== -->
  <h2 id="dev">Development &amp; Learning</h2>

  <!-- Site 3: MDN Web Docs -->
  <h3>3. MDN Web Docs</h3>

  <!-- Grouping an image and its caption with figure and figcaption -->
  <figure>
    <a href="https://developer.mozilla.org/en-US/" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/coding/500/300"
        alt="MDN Web Docs - the official web development documentation (click to visit MDN)"
        width="500"
      >
    </a>
    <figcaption>MDN Web Docs - the most trusted reference for web standards</figcaption>
  </figure>

  <p>
    This is the official web development documentation site run by Mozilla.
    It provides the most accurate and detailed information about HTML, CSS and JavaScript.
    Much of it has been translated into other languages, so developers around the world use it too.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://developer.mozilla.org/en-US/" target="_blank" rel="noopener noreferrer">
      Go to MDN →
    </a>
    If you are studying web development, this is the most reliable official documentation you must know
  </p>

  <!-- Site 4: GitHub -->
  <h3>4. GitHub</h3>

  <figure>
    <a href="https://github.com" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/github/500/300"
        alt="GitHub - a code hosting and collaboration platform (click to visit GitHub)"
        width="500"
      >
    </a>
    <figcaption>GitHub - the code repository and collaboration space of developers worldwide</figcaption>
  </figure>

  <p>
    This is the most widely used code hosting and collaboration platform in the world.
    It manages code versions with Git and lets you contribute to open-source projects.
    You can create unlimited public repositories for free, so it also works as a developer portfolio.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://github.com" target="_blank" rel="noopener noreferrer">
      Go to GitHub →
    </a>
    The code management and portfolio platform every developer has to use
  </p>

  <p><a href="#">▲ Back to top</a></p>

  <hr>

  <!-- ============================== -->
  <!-- Category 3: Entertainment     -->
  <!-- ============================== -->
  <h2 id="entertainment">Entertainment</h2>

  <!-- Site 5: YouTube -->
  <h3>5. YouTube</h3>

  <figure>
    <a href="https://www.youtube.com" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/youtube/500/300"
        alt="YouTube - a video streaming platform (click to visit YouTube)"
        width="500"
      >
    </a>
    <figcaption>YouTube - the largest video sharing platform in the world</figcaption>
  </figure>

  <p>
    This is the world's largest video sharing platform, run by Google.
    You can watch videos for free in many fields, including music, film, education and games.
    It is also very rich in IT learning content, such as HTML and CSS courses.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://www.youtube.com" target="_blank" rel="noopener noreferrer">
      Go to YouTube →
    </a>
    The best video platform for handling entertainment and learning at the same time
  </p>

  <p><a href="#">▲ Back to top</a></p>

  <hr>

  <!-- ============================== -->
  <!-- Category 4: Shopping          -->
  <!-- ============================== -->
  <h2 id="shopping">Shopping</h2>

  <h3>6. Coupang</h3>

  <figure>
    <!-- Turning an image into a link: putting an img tag inside an a tag -->
    <a href="https://www.coupang.com" target="_blank" rel="noopener noreferrer">
      <img
        src="https://picsum.photos/seed/shopping/500/300"
        alt="Coupang - the largest online shopping mall in Korea (click to visit Coupang)"
        width="500"
      >
    </a>
    <figcaption>Coupang - the largest online shopping platform in Korea, famous for Rocket Delivery</figcaption>
  </figure>

  <p>
    This is the largest online shopping platform in Korea.
    Its Rocket Delivery service can get an order to your door in the early hours of the next day.
    Many people use it because they can buy products from a wide range of categories at reasonable prices.
  </p>
  <p>
    <strong>Reason to recommend it:</strong>
    <a href="https://www.coupang.com" target="_blank" rel="noopener noreferrer">
      Go to Coupang →
    </a>
    The platform with the best shopping convenience thanks to fast delivery and a wide range of products
  </p>

  <p><a href="#">▲ Back to top</a></p>

  <hr>

  <!-- ============================== -->
  <!-- Contact                        -->
  <!-- ============================== -->
  <h2 id="contact">My Contact</h2>
  <!-- id="contact": the <a href="#contact"> in the contents list jumps to this spot -->

  <p>If you have a link to recommend or any questions, please get in touch below:</p>

  <ul>
    <li>
      Email:
      <!-- Creating an email link in the mailto: format -->
      <!-- You can also prefill the email with ?subject=title&body=message -->
      <a href="mailto:[email protected]?subject=Bookmark%20link%20suggestion">
        [email protected]
      </a>
      (clicking opens your email app)
    </li>
    <li>
      Phone:
      <!-- Creating a phone link in the tel: format. Clicking it on a mobile device opens the phone app -->
      <a href="tel:+15551234567">+1 (555) 123-4567</a>
      (clicking it on a mobile device opens the phone app)
    </li>
    <li>
      GitHub:
      <a href="https://github.com" target="_blank" rel="noopener noreferrer">
        github.com/johndoe
      </a>
    </li>
  </ul>

  <p><a href="#">▲ Back to top</a></p>

</body>
</html>

Learn this lesson with a mentor

Work through the Build Your Homepage series on your own, or join a guided cohort at our Pitampura campus and online.

Call NowEnroll Now