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 in HTML by Tejashwini
• 1,660 points
9 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 in HTML by Tejashwini
• 1,660 points
12 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 in HTML by Ashwini
• 1,160 points
13 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 in HTML by Ashwini
• 1,160 points
34 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 in HTML by Tejashwini
• 1,660 points
17 views
0 votes
0 answers

Chrome extension HTML Tree Generator is not working

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

Jul 27 in HTML by Tejashwini
• 1,660 points
26 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
517 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
4,749 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,720 points
271 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,280 points
309 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP