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 trialChristopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsHow Do I Add Desktop Folder Images Into Html Without Using CSS?
I have tried this before with Html and failed. How do I add images from my desktop into the html photo gallery without having to use CSS?
If images are online so far I have learnt that we use <img src="">' in ol or ul's.
And from what I have learnt so far, I have been thinking that '<img src="">' only sources from the internet and not images in a desktop folder. I might be wrong though, and can '<img src="">' add images from desktop into website when you are still building it and the website is not yet live/hosted?
Again I hope my question is clear as I need this information.
I am still building my first ever source code website and right now it is sitting in my desktop folders but I am able to test it on my MacBook pro locally.
2 Answers
Nicholas Olsen
Front End Web Development Techdegree Student 19,342 PointsAssume the files on your desktop look like this:
Desktop/index.html
Desktop/image1.jpg
Desktop/images/image2.jpg
Then, in your index.html file, you could write the following:
<img src="image1.jpg">
<img src="images/image2.jpg">
The html file that you are writing can reference images locally, as along as it references them relative to its own location.
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsMy my, did I ask this question 4 months ago? Lol.
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsChristopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsLet me try that Nicholas, thanks, will be back