PDA

View Full Version : anyone here know how to place images?


Animan
03-26-2003, 08:11 PM
im getting a little mixed up in trying to place an image in my html?
thanks for the help.

brothercake
03-26-2003, 08:23 PM
What do you have so far?

Animan
03-26-2003, 08:24 PM
umm i jsut learned from a friend and forgot most of it so i need all of it

Nightfire
03-26-2003, 08:29 PM
Ok, say you wanted to use the http://www.codingforums.com/images/icons/icon4.gif on your site, you'd add the following html

<img src="http://www.codingforums.com/images/icons/icon4.gif" width="15" height="15" alt="This is icon4" />

src="http://www.codingforums.com/images/icons/icon4.gif" is the file path to the image you wish to use

width="15" is the width of the image you're using (in this case 15 pixels)

height="15" is the height of the image, again this is 15 pixels

alt="This is icon4" this is used as "alternate text", this is incase the image isn't loaded, it'll show text there instead, in this case, if the image didn't load it'll say "This is icon4". I think it also helps blind users know what the image is too

/ Get used to closing your image tags with this backslash, as you'll be using this method when/if you go onto xhtml

Animan
03-26-2003, 09:08 PM
wut if i had a picture on file and wanted to add it?

Nightfire
03-26-2003, 09:34 PM
Just replace http://www.codingforums.com/images/icons/icon4.gif with whatever it is you're wanting to use,

src="yoursite.com/yourimage.jpg"

add the width and height for the image too

cg9com
03-27-2003, 01:47 AM
Hi,
To really grasp it better, i think you need this:
W3Schools XHTML Tutorial (http://www.w3schools.com/xhtml/default.asp).
Seriously. :D

<html>
<head>
<title>Mytitle</title>
</head>
<body>
<img src="file.extension" alt="" />
</body>
</html>