frog1944 frog1944 - 2 years ago 58
HTML Question

Including an image in a list

I'm struggling to get an image in a list. When I do the following:

<li><img src="image.jpg"></li>

An image icon appears (like an error) and the image doesn't show. Is there anyway to display the image?

Answer Source

When using <img src="..."/> you can choose two path types.

Local Filesystem

You can select an image to use from the local filesystem. Can be either definite path (C:/Users/...) or relative to the current folder. In your example, you are looking for a file named image.jpg in the current folder which most likely does not exist.

Please note that the file location must be relative to the location of the HTML file.

Remote Image Location

You can insert a link to a remotely hosted image, something like

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download