Shoutbox

HTML Pics - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: HTML Pics (/showthread.php?tid=59619)

HTML Pics by welshboy222 on 05-21-2006 at 08:51 PM

How do I put a image/picture into HTMl im confused with the filename. eg my file is called Guy.jpg I put that in but the image doesn't show up plz help


RE: HTML Pics by Stigmata on 05-21-2006 at 08:52 PM

<img src="guy.jpg">



RE: HTML Pics by Adeptus on 05-21-2006 at 11:20 PM

Just a note to add to Stigmata's comment...   Depending on the web server you are uploading this to, file names may be case sensitive. 

In other words, "Guy.jpg", "guy.jpg" and "Guy.JPG" would not typically be treated as equal by a Unix based server (while they are equal on your Windows computer).  Always use the same case and capitalization as your file name.


RE: HTML Pics by welshboy222 on 05-22-2006 at 03:43 AM

Also I put the picture in a file called IMAGES in a file called website and I put Guy.JPG but it still doesnt work


RE: HTML Pics by Supersonicdarky on 05-22-2006 at 03:47 AM

<img src="images/Guy.JPG">


RE: HTML Pics by Vilkku on 05-22-2006 at 04:22 AM

to be on the safe side, you can type in the whole path of the image. Let's say your html file is in http://www.uberleethost.com/welshboy/ and that your image is in http://www.uberleethost.com/welshboy/IMAGES/.
With this you have two options:
1) (the one Supersonicdarky wrote)
<img src="IMAGES/Guy.JPG">

2) The whole URL, this works on all pages on all sites
<img src="http://www.uberleethost.com/welshboy/IMAGES/Guy.JPG">


RE: HTML Pics by CookieRevised on 05-22-2006 at 09:58 AM

Quick but major tip: never use mix case in filenames and directories, always use lowercase names (and try to avoid spaces)!


RE: HTML Pics by andrewdodd13 on 05-22-2006 at 12:05 PM

Also, if you want to be really accurate (not sure if this applies) but the standard XHTML specs (I don't know if it appears in the HTML4.0 spec) say that you should include an alt= text for non-graphical browsers, or if the image isn't found.

For example:

code:
For HTML 4.0 Transitional:
<img src="picture.jpg" alt="This is a picture">

For XHTML 1.0:
<img src="picture.jpg" alt="This is a picture" />

Although... you probably won't have an idea what I'm on about... adding the alt= text can also help find if it's your code or the location of the picture which is in error - if there's no text or picture, it's the code, if there's text then the picture can't be found.
RE: HTML Pics by Mike on 05-22-2006 at 01:57 PM

quote:
Originally posted by CookieRevised
(and try to avoid spaces)
Or if you really need to use spaces, you should use them like this:
code:
<img src="this+is+a+picture.jpg" alt="picture" />

Or:

code:
<img src="this%20is%20%a%20picture.jpg" alt="picture" />

Both of these should be XHTML valid.