Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Review: Common HTML tags

What two attributes should you put on an <img> tag?

What two attributes should you put on an <img> tag?

Hey I'm new to this also but in my notes I think it's the 'href' attribute. Also I found in my notes that the <a> can turn an image into a link. Hope this helps

2 Answers

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello, Albert

In order for the image tag to load an image, it needs a source to acquire the image. Images also need an alternative description to read out to users who use a screen reader and in cases where the user can't view the image due to a slow connection or an error loading the source.

I hope this helps.

Thank you this was helpful

Thanks!

Thank you also I learned something as well