Nest the existing img element within an a element.
See original GitHub issueChallenge Turn an Image into a Link has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}
h2 {
font-family: Lobster, Monospace;
}
p {
font-size: 16px;
font-family: Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.smaller-image {
width: 100px;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<p>Click here for cat photos<a href="#"><img src="https://bit.ly/fcc-running-cats" alt="Three kittens running towards the camera."></a></p>
<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. ">
<p class="red-text">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 class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Nest the existing img element within an a element - HTML-CSS
Your browser information: Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ ...
Read more >Nest the existing img element within an a element. · Issue #8914
Challenge Turn an Image into a Link has an issue. User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, ...
Read more >Can I nest an image inside a link and vice versa? - Codecademy
We can nest an image inside a link, yes. The reverse is not possible since images are void tags with no content. They...
Read more ><img>: The Image Embed element - HTML - MDN Web Docs
The HTML element embeds an image into the document. ... To do so, nest the <img> tag inside the <a> . You should...
Read more >HTML img element nested within an a element.. help for a ...
I know the problem is that I didnt close the img tag, then open a second a tag inside it. But I cant...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
help it did’t work
you forget to implement class after the img tag… removed solution by mod