question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Your image element must have an alt attribute.

See original GitHub issue

Challenge 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:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dhcodescommented, Dec 20, 2016

Closing as resolved.

1reaction
dhcodescommented, Dec 20, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found