HTML <img> with alt Attribute

You are Here:

HTML <img> with alt Attribute

The alt attribute specifies an alternate text for an image, if the image cannot be displayed (because of 404 error, slow internet connection, etc.).

Note: The W3C HTML validator will throw an error if the alt attribute is not specified.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <img src="bookss.png" alt="python books"> </body> </html>

Attribute Value

ValueExplanation
textSpecifies an alternate text for an image.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author