How to add an image to a button?

When i add image to my web page through html. it will shows a cross button not a picture. what can i do?

  • Answer:

    <p><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></p> You can change the "p" tags to div tags and style as needed. The src="" attribute must have the correct path to the image online. If you have images in their own folders: <p><img style="width: XXpx; height: YYpx; border: 0;" src="images/your_image.jpg" alt="Text Description"></p> Make sure you do NOT use compound names for your folder and file names. Some browsers will not parse a link's white space. Ron

RUDRAKSH PATHAK at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

ahaan well buddy u done one 'small' mistake and i.e is u didn't defined ur image source properly. chk the code again and see if u give the proper path for the image or not if it's yes then u can try " ../ " before the image path something like this: <img src="../img/myimage.jpg"> the x cross indicate tht ur image is missing from tht part of html.

JD

The answer to this question can only be 2 things: 1) in the HTML the name of the file doesn't match what you have in the coding, it needs to be exactly the same. 2)You never uploaded the picture when you uploaded your website. Give me the coding and i will help you find your problem.

Geoffrey Gordon

When you add image to your webpages from an outside source such as yahoo images or google, you have to first save the picture and then drag it out onto your webpage. This is if you are making a website or adding pics to an already created personal website that you created earlier. If it is an image that is from your camera and it doesn't load, then your computer does not have the latest digital and video software. These can be downloaded for free on the internet. If you saved your images and it is still a cross, then it is also because you have inadequate software and you must download shockwave or something of the sort. (i think)

AntiSocialClub

owhh,when you type the wrong html code it will shown small cross icon.are you sure you type the right code.?? if im not wrong the code should be " src=(location)".which web hosting are you used?if it from local host it doesnt required server or third party program.If you create website use a cold fusion more easy to use.

Romzi a

cross button means the link you specified in the image is broken.... go to http://imageshack.us and upload your image and you will receive a direct link to the image. direct links usually looks like this http://img88.imageshack.us/img88/2920/definition.jpg and then <img src="http://img88.imageshack.us/img88/29…

Doraemon

<html> <head> </html> <body> <img src="image_name.jpg"> </body> </html> save as image.html and save the image in same folder where you save the .html file. if you want to display image from different folder do like this <img src="c:/folder/folder/image_name.jpg">

Xicroz Xadanz

It simply means that the path you entered was not correct. <img src="images/example.gif" /> ^ This would go into the images folder and display the example.gif image on the HTML document

Kitty Juice

ya, the problem is in either the image path given by u or in the mismatch in the image file extension ok, so chek out it again

amit

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.