riptony   10 #1 Posted November 14, 2006 Hello, I'm brand new to HTML  I'd be so grateful if somebody could help me out with this:  I'd like to include a picture on a webpage. if i save the picture as say cat.gif then should <img src="cat.gif" /> display the image?  or do i need to include where the image is saved?  and do i need the / at the end?  so grateful for help Share this post Link to post Share on other sites Share this content via...
DaFoot   10 #2 Posted November 14, 2006 if the image file is in the same diractory as that HTML page then it should work Share this post Link to post Share on other sites Share this content via...
mr chris   10 #3 Posted November 14, 2006 If you're using XHTML, you'll need the / to "self close" the tag - like using <br /> instead of <br> .  All tags in XHTML have to be opened and then closed in order to be valid code.  http://www.w3schools.com should be your next port of call. Share this post Link to post Share on other sites Share this content via...
DareToDream   10 #4 Posted November 14, 2006 Most people put their images in a folder called images, but you don't have to. It's just for convenience, so that all the images are in one place.  You could do it as you said. In Windows Explorer (if you're using it) you'd see pagewhatever.html, pagewhateversomethingelse.html, cat.gif and it would work.  If you put your cat.gif in a folder called images then the link would be <img src="images/cat.gif" /> Share this post Link to post Share on other sites Share this content via...
DaFoot   10 #5 Posted November 14, 2006 If you're using XHTML, you'll need the / to "self close" the tag - like using <br /> instead of <br> .  Or indeed ...  <img src="cat.gif" /> As you originally did Share this post Link to post Share on other sites Share this content via...
riptony   10 #6 Posted November 14, 2006 thanks for this excellent help guys.  so if my image is saved in the same folder as the webpage is the destination would just be cat.gif and if i have an images folder in the folder that the webpage is the destination would be /images/cat.gif ? Share this post Link to post Share on other sites Share this content via...
esme   10 #7 Posted November 14, 2006 the reference would be <img src="images/cat.gif" /> Share this post Link to post Share on other sites Share this content via...