I’m confused

Inserting images

How do I enter a picture from a totally different file that I am working on? For example, how do I tell the computer to go to my c: drive, documents folder, websites folder, and insert the file lemonade.jpeg? or even replace the picture used in the practice file with a picture on my computer? What is the exact tag? Please help.
1 person has
this question
  • Hi LaShawn,

    The easiest way to find the path to a file on your local machine is to open it in your browser. In Firefox, you can do this by going to File > Open File and selecting the image or file.

    In the address bar, you'll see the path that you can use to reference the local file. I'm on a Mac, so this may look different than what you would see, but here's an example:

    So, if I wanted to include to that image, the tag would look like this:
    <img src="file:///Users/rachel/Desktop/Sample/image.jpg" alt="example image" />

    When you're working with local files, the simplest way to do things is to keep the html file and the images, stylesheets, and scripts you're working on in the same directory, that way you can link to them with relative URLs, like "image.jpg", instead of the full path. For example, if my html file were in the Sample folder on my desktop and the image was in that same directory, I could just reference it like this:
    <img src="image.jpg" alt="example image" />

    If a link isn't working or an image isn't showing up, that usually means the path is wrong. So, try opening the file in the browser to confirm what the path should be.

    Hope that helps!

  • (some HTML allowed)
    How does this make you feel?
    Add Image

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated