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

Images and there critical role on the web

The basics of images and there critical role on the web. In this session we will cover the basics of adding images into any web page.

Video Transcript

00:00Alright, so welcome back. We just learned about attributes in a theoretical way
00:04We gave an example of a car and we said that as as as much as a car has people inside of it
00:10So we they're nested inside of the car. They're basically they they're in the car
00:15In the same true as B when something is bolded
00:18It's inside of a paragraph on the contrary when we want to say that a car is blue
00:23We wouldn't nest that inside of inside of the car
00:25We'll probably put that as an attribute of the car
00:27We would say this car is blue, but it doesn't and that is basically the relationship
00:32So when you ask yourself sometimes, okay, should this be inside or should this be an attribute?
00:36Really a lot of times the question is a question of belonging does this belong to it or is this inside of it?
00:41And that would ninety nine point nine percent answer the question of should it be an attribute or should it be a property?
00:47So let's let's start with our image property
00:50And if we go if you go into your HTML in the source files that we you'll find one of our banners
00:56Which is going to be cheap thrill XML, which is literally a promotion to one of our for of our features of the month
01:03Learning doesn't have to be a cheap thrill. We really want that to be part of our blog posts
01:07We want people to be able to see our banner
01:10To do that. We have to add a new attribute, which is called images
01:13So I'm going to go into the image tag and let's find where do we want to put it
01:16I'm going to put it right after the headline
01:18I'm going to put here a new image tag and I'm going to self bound it because it doesn't contain anything inside of it
01:24Now I have to basically say to it. What image is it just as much as I would say what car is it?
01:29It's not saying that the image itself is not inside of the image tag. The image is
01:35Basically it we're just telling it what it is
01:37So to do it what we're going to do is we're going to put here a space and we're going to put an attribute
01:41That's called source SRC
01:43Equals and then we're going to say to it. Where is the file?
01:47Now the file is if we look into our HTML itself right now
01:50We'll see that our file is in the exact same folder as our HTML file
01:55So all we really have to do is just type inside of here the actual location of the image
02:00So I could just come right here into the source paste the actual location of the image click on save
02:07Once I've done that I'm basically done if I go into my HTML and I click on refresh now
02:13We're going to see our banner before we see our text

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!