FCC Challenge 21: Link to External Pages with Anchor Elements
March 08, 2016
In Free Code Camp Challenge 21 we’re linking to external pages with anchor elements:
a elements, also known as anchor elements, are used to link to content outside of the current page.
Here’s a diagram of an a element. In this case, the a element is used in the middle of a paragraph element, which means the link will appear in the middle of a sentence.
Here’s an example:
[html]
Here’s a link to Free Code Camp for you to follow.
[/html]
Create an a element that links to http://freecatphotoapp.com and has “cat photos” as its anchor text.
The original source code is:
[html]
CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
[/html]The modified code should look like:
[html]
CatPhotoApp
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
[/html]