Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChad Cruz
311 PointsImage Files
How do you upload/name your image that you want to use in the site design to respond to the src tag of "img/logo.gif"? In other words if I have an image on my computer how to I get the HTML to recognize where to find the src of the file.
1 Answer
Jacob Miller
12,466 PointsThe src
specifies first the directory (in your case the img folder), then the file name (in your case logo.gif). Usually you create a folder named img in the same directory as your index.html file, then put all your images in there. You can name your files whatever you want, just change the name in the src
.
Example: if I had a Facebook icon that was a png image, I might name it facebook.png and place it in the img folder. The in my <img>
tag I would set the src
to src="img/facebook.png"
.
Hope that helps.