Create an a element that links to

Tell us what’s happening:

Your code so far


<h2>CatPhotoApp</h2>
<main>



<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
<a>https://freecatphotoapp.com "cat photos"</a>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36.

Challenge: Link to External Pages with Anchor Elements

Link to the challenge:

Hi Mayekar,

Screen Shot 2020-11-01 at 10.24.43 PM

that’s how you add a link using an “a” element, that displays the words “cat photos” on the web page, and when the user clicks on it, it will take them to “https://freecatphotoapp.com”.

hope this helps!

1 Like

Hi,
To use an anchor element <a></a>, you place the hyperlink reference within the opening tag, and the text you want to be hyperlinked between the opening and closing tags, example below:

<a href=“https://google.com”>This Is Clickable Text</a>

The above code rendered in a browser would look like this:

This Is Clickable Text

2 Likes

Exactly how I succeeded with mine. Thanks buddy.