Please Scroll Down to See Forums Below
napsgear
genezapharmateuticals
domestic-supply
puritysourcelabs
UGL OZ
UGFREAK
napsgeargenezapharmateuticals domestic-supplypuritysourcelabsUGL OZUGFREAK

HTML help needed for a non geek

Fast Twitch Fiber

New member
I've been playing around with this html stuff typing in text and displaying it in my browser. I want to put picture that are stored on my hard drive onto the page. I see that I need to use the <img> tag but what do I put in between? How does the picture go from my hard drive to the web page. The book I have shows adding pictures by putting a URL in between the <img> tags. However, I don't have a URL for the pictures since they are on my hard drive. I'm confused. :confused:
 
Last edited:
you need to upload that picture to a server where your page can reference it.

so, if your page is in the root directory of your server, and you have an image called "picture.gif" in a folder called "images", the code would look like this:

<img src="images/picture.gif" width="48" height="48">


the width and height specified there as well.

you can also hard code a url in there like this:

<img src="http://www.domain.com/images/picture.gif" width="48" height="48">


the key idea here is that you will have to host that image somewhere, and have the correct path to it in your code.

hope that helps.
 
OK, I don't have a server yet. I was just playing around using my browser to display the page. I guess I can't use pictures unless I have a host for my site.
 
I bought the HTML for Dummies book. I've done pretty much all the pages on my site from scratch. Probably not the easiest way to go, but I feel like I have all the control that way.
 
Fast Twitch Fiber said:
OK, I don't have a server yet. I was just playing around using my browser to display the page. I guess I can't use pictures unless I have a host for my site.


you can,

what you need to do is set up a directory structure on your hard drive, and when you go to publish these to the web (upload to a server) you just need to keep that exact same directory structure....all relative to the root directory.

for example you might set up a directory structure like this:

-> web
-> images
-> about_me
-> contact
-> another_directory
->folder


web being the main root directory, and images, about_me, contact, and another_directory being sub directories under web

folder is a sub directory within another_folder


then, when you go to set up your server, you just create the same structure in whatever your root directory is called. instead of web, it might be called html or www or something depending where you host it.

an editor will help you tremendously, but you'll still need to understand relative filepaths and directory structures to make everything work
 
you can easily point to an image on your hard drive in HTML. If you have an image call "pepsione.jpg" on your desktop (which I happen to have), here's what the image tag would look like:

<img src="C:\Documents and Settings\firstname.lastname\Desktop\pepsione.jpg">

Note that I've obviously replaced my real name with "firstname.lastname". Just right click on the image and you'll find out where on your hard drive it is though and just point to it. Simple as pie.

Note, you're the only one who's going to be able to see this image. But it's a good way to play and lear a bit about html
 
oh, and the <img> is one of those tags where you don't need and </img> tag. In fact, you'll probably just confuse most browsers if you try to use the end tag for <img>.
 
sermon_of_mockery said:
doooood,do yourself a favor,and download a html editor,start doing the tutorials.
Also upload that pic to a free site like www.webshots.com or
www.villagephotos.com They're both free so take advantage.

<preaching>

If you just want to learn how to create "pretty pages" and don't need to understand what's going on under the hood, I completely agree with you. But if you really want to learn HTML, you've got to do it the hard way and actually learn how each tag works. Playing around with <img> tags on your own machine is not a bad idea if you really want to learn.

</preaching>
 
Top Bottom