November 3, 201312 yr Hi guys. I am having issues on my website that i am trying to design. I have a folder named web site, and in it i have my images in jpg format. I am trying to add a picture to the top of the page in the middle but its coming up with the alt. Could someone tell me the code i should use for adding the image? Thanks ATR
November 4, 201312 yr When you say "add a picture", do you mean it's some kind of click-and-drag thing in a web design program? I'm guessing you didn't type the code for it since you're asking what the code is. Either way, the universal HTML for an image is: <img src="/my-image.jpg" alt="Some description" title="Some description"> The title pretty much acts the same way as the alt in the sense that it adds a title, but if the image breaks then the alt description will appear, not the title. So use both, I'd say, plus it's more browser-friendly.
November 4, 201312 yr Author No mate, im doing it in coffee cup. the code im using is: <img src="images/www.jpg" alt="gold www" /> I have put it in a separate folder called images, that folder is in the same place as where my html pages are. Is my code right? Thanks Edited November 4, 201312 yr by avenge the rage
November 25, 201312 yr Hello. The code you have used below should work as long as the images are in the "images" folder and the image is called "www.jpg" even though this is not the correct way. <img src="images/www.jpg" alt="gold www" /> If you can, it would be best to change your code so it is: <img src="/images/www.jpg" height="0px" width="0px" alt="Your Image Description" title="Your Image Title" /> All you need to do is change img src to your image location, height and width to the correct numbers and the alt and description.
November 26, 201312 yr What oChapperZo said, the URL path that you are using suggests that the image is in a folder called 'images' if they are in the main directory then this should work <img src="www.jpg" alt="gold www" />
November 30, 201312 yr Author Thanks guys. I will have a go at sorting it out. Had a few computer issues so will need to get it back to how it was first, but then i will have another go at doing this
Create an account or sign in to comment