I think I'm confusing myself and would like help about adding photos to a website :)

before i went on free code camp i watched some youtube videos on html and for adding an image to a website they said to use this code:

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

(they said to save the image you want in the same folder as your html code so you don’t have to add the code to look for the picture in another folder)

then I use free code camp and they said to use this code to add an image:

<img src="https://www.freecatphotoapp.com/your-image.jpg">

what I am confused about is why add a url? I dont get what it even is for- is it meant to be the url I am working on or an entirely different one? I don’t know I’m just confused as to why its there and what for.

if anyone could reply I would be very greatful! i am a complete noob at coding so sorry if this is a really dumb question lol

could you add some more context? is this a freeCodeCamp challenge? can you provide the link to it? what is the code you are asking about?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

The free code camp image is being added from the web while from YouTube the image is being added from the folders within your workstation/ space. I think that’s the difference. I think this might help


1 Like

ohh okay, thank you! i will do that next time!! : )

thank you so much!!! i think this is the answer :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.