Your image element must have an alt attribute.
See original GitHub issueChallenge Add Images to your Website has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
.
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;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<img src="https://bit.ly/fcc-relaxing-cat"
alt="picture-of-a-relaxing-cat"
>
<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>
my code seems fine to me…but when i am running this I get an error which says "Your image element must have an alt attribute."You can see that in my above code, my image element have an alt attribute. Hope you correct this bug soon.
– Md Fuadul Islam
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
An “img” element must have an “alt” attribute, except under ...
Guide describing the HTML issue detected by the W3C Validator: An “img” element must have an “alt” attribute, except under certain conditions.
Read more >An alt attribute must be present on img elements
The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an...
Read more >Image ALT Tag Tips for HTML - Penn State | Accessibility
The ALT text adds a text description to an image on a Web page, and should be used for all images, graphical bullets,...
Read more >What does this warning message mean? 'img elements must ...
It means when you create an image in your HTML, you should include an alt attribute for the benefit of screen readers and...
Read more >Images must have alternate text | Axe Rules - Deque University
Ensure all informative <img> elements have short, descriptive alternate text and all decorative <img> elements have empty alt attributes (e.g. alt="" ).
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
Closing as resolved.
@Md-Fuadul-Islam Try refreshing your page and then use the “Author standing on a beach with two thumbs up.” alt-tag. Your other one doesn’t work because it has dashes, though this has been fixed on beta and will be updated when the site is next updated.