HTML if image is not found

0 votes

In an HTML page, I have an image:

<img src="smiley.gif" alt="Smiley face" width="32" height="32" />


If the image cannot be located on the server, an unsightly blank square is displayed.

If a picture cannot be found, I want it to display nothing or an other default image that I know is present on the server.

How is this accomplished?

Jul 26, 2022 in HTML by Tejashwini
• 3,820 points
620 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
0 answers

Inputting a default image in case the src attribute of an html <img> is not valid?

Is there any way to render a ...READ MORE

Jul 8, 2022 in HTML by Tejashwini
• 3,820 points
649 views
0 votes
0 answers

Inputting a default image in case the src attribute of an html <img> is not valid?

In the event that the src property ...READ MORE

Jul 12, 2022 in HTML by Ashwini
• 5,430 points
399 views
0 votes
0 answers

PHP - If variable is not empty, echo some html code

If a variable is not empty, I ...READ MORE

Jul 24, 2022 in HTML by Ashwini
• 5,430 points
993 views
0 votes
0 answers

Why image in HTML is showing as broken image

I have the following HTML code and ...READ MORE

Jul 4, 2022 in HTML by Tejashwini
• 3,820 points
723 views
0 votes
0 answers
0 votes
0 answers

Chrome extension HTML Tree Generator is not working

I installed HTML Tree Generator to observe ...READ MORE

Jul 27, 2022 in HTML by Tejashwini
• 3,820 points
1,320 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,400 points
1,229 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,608 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
880 views
0 votes
1 answer

Using Post and Get for Embedded System Communication

Twitter would be a great place to ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
747 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP