Question:
html image problem!?
PJ
2007-05-26 10:14:10 UTC
Im creating a website for my school so people can leave year book entries and pictures of our last day but unfortunatly i dont know how to get pictures to be dislayed, can anyone help??
the images are here on my computer---> C:\Images
please help me write the coding to diplay gallery of pictures
thanks regards
I tried with this please correct-


<\img>
Seven answers:
Colin K
2007-05-26 10:23:58 UTC
First, the images need to be uploaded to the server. A webpage can't access them if they are on your home computer. Once you have them uploaded, enter:







You don't need the & before and after.
jersjazz
2007-05-28 12:15:52 UTC
If you are going to put the images on the internet (rather than on the school's intranet) you will need to use an FTP program to upload the pictures to the website.



You will probably need permission from the system administrator (the person in charge of the computer system at the school) - they may not allow you to do this.



You also need permission from the people who wrote the yearbook information (or took the photographs), otherwise you could be infringing their copyright.



If you get all these permissions, there are plenty of "free FTP programs" you could use eg. filezilla (just do an online search)



You must only link to pictures which you are hosting on your own website, otherwise you will be stealing someone else's bandwidth - not a problem in this case.



Therefore your must first upload the images (suitably optimised) to the school website.



FTP allows you to upload a whole folder-full of images at a time. It's best to put them into a separate directory named images, preferably in the home folder, eg. http://www.yoursite.com/images/



Then, whichever website page you are on - however far down your website's directory structure, you can use a relative link to add any image stored in this particular folder.



eg to add the image which is stored at http://www.yoursite.com/images/pic1.jpg...

you only need to refer to /images/pic1.jpg

(If you are already in the home directory then you can leave off the initial slash, but it will work OK with or without the slash.)



The code would be

It has no closing tag.

However, that is not enough. You also have to specify alternative text (either an informative word / phrase, or an empty alt tag if the image is merely decorative.) This allows screen readers (used by blind users) and mobile devices (such as PDAs) to tell users what the image represents.



There are other tags you may add, such as:

- width (pixels, percentage etc)

- alignment (sets the image at the top, middle or bottom of your text, or floats the image to the right of left of your content)

- title etc.



graph showing 20% rise in sales between September and November 2007



The first slash means that the folder is back in the main directory - it doesn't matter which folder you are starting from on your website.



If you store your images in a different place then you must reflect the location in the way you specify your url.



If you have a good reason to link to an image from another website you must use the full url, including http:// etc.



To use an image as a link, just wrap it inside a link:







starts the link. Then add



description here



to show the images (as a link). Then complete the link with







It's quite straightforward.



There are also tiny scripts you can add to your page (easiest if your host supports php) which automatically display every image in a folder - and all sorts of others too.



If you need to know more about these, let us know that you have sorted out all the permissions, and also the details of your server.



Good luck!
anonymous
2007-05-26 14:53:30 UTC
On the server that you are uploading to, are you going to create a sub-directory called images? If so then you will need to code the path as either realtive or absolute for the location of the image.



madison.jpg



The tag does not have a closing tag i.e. is not required.
Big J
2007-05-26 10:19:05 UTC




Where url is either the full url of the image (http://www.blah.com/pic.jpg) or the path to a local image (pictures/pic.jpg)

Also note that it's src not scr.



You do not need to close the tag, does not exist, you only need one tag like so:



If you wish to close the tag to conform with xhtml standards, then you can do it like this:





Also, the images have to be uploaded to a server where the website is hosted; unless you are testing it locally, or your computer is setup as a server, then you cannot share the pictures on your harddrive on the internet.

I don't know where your webpage is located, but take note that you can use ../ to move up a directory.

So if the picture is in C:\Images and the html file is in C:\html then you would do it like so:



Same goes for multiple direcoties, if the html file is in C:\html\pages

then you would do it like so:

anonymous
2007-05-26 10:22:14 UTC
Include the filename extension (.jpg etc)

just this







try looking at other peoples pages (view their source).
?
2016-10-08 08:04:33 UTC
a hundred% width means in basic terms the actually length of the image. the easy way, with inline style:
anonymous
2014-08-31 22:11:14 UTC
I found a free download of Lock Folder here http://j.mp/1BOMyBX


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...