02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Loading Images in Different Folders

Relative Paths: We don't mean how you can get to your ants house... Actually its exactly what we mean. Paths are paths in a computer or in real life. your relationship with your ant is much better I bet then your relationship with someone you don't know.

Video Transcript

00:00Welcome back everybody. So far how are you doing with images ?
00:04-is everything still okay ? -It's a lot to chew up but you said it quite simple
00:11and I'll go over it and that's quite a lot to digest. -Oh for sure, it's a lot of stuff
00:17By the way if you feel like you've learnt too much, like my mom just said...
00:21don't continue watching this vidos, take a break, watch this stuff again and practice.
00:26Practice makes perfect. If you're only watching the videos you won't get it.
00:29You have to watch a couple of videos stop, and start practicing,
00:33Spend a week on it, there's no rush, you have unlimited access to this course,
00:37there's no timer that says you have to finish it in an hour or a week,
00:41so take your time and practice before you move on to continue learning.
00:47But with my mom we're going to force to continue learning.
00:52Because we want to do as much recording as we can today.
00:56Let's go back into the way the image structures work,
01:00Until now we put the image that was literally in the exact same folder,
01:04In our folder we had a .jpg and then we had our HTML which is our page
01:10our relationship was just like with ours - when we talked about nesting tags,
01:15are files are siblings, and because our files are siblings we just put the name of the file directly,
01:21but if our image file was in a deeper folder,
01:25let's say we had a folder here that was called 'images'
01:28and our images folder contains now our 'cheap thrill xml' image
01:32now obviously our HTML wouldn't find the image anymore
01:34because it's not in the same folder anymore.
01:37To make it know that's it is inside of this directory is quite simple,
01:41We would go to the folder up here where they're our sources and we would type:
01:45'imgs/ ' and we're going to click on save
01:53Once we did that our image will move and we'll see that our image will still load without any problem.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!