Grow your business, income, & life

20+ yrs of experience to offer you education and business services that launch and grow your business

HTML Tutorial for Beginners: 10 Adding Images & Img Attributes (Width, Height, Alt, Src)

Hey this is Sasha and thanks for joining me here for another video training lesson.

Today I’m going to share with you how to embed an image in your HTML code, so that way, as you’re looking to the hot pictures within your website, how can you add a picture or image on the page as you continue to work on your business website and evolve your business presence online.

Let’s take a look at the code and let’s see how we can do this.

Adding Images

Here what I’ve done is I have a basic stripped down page or version of my website. Now in order for me to add an image, we need to be able to have an image and a certain folder. Now the place that I’ve added it is exactly where my page resides — the location where my page resides.

Otherwise, if it’s not there, you need to link it or add a directory into it, which I’ll show you here in a second. But the code in order to add the image in there is it’s just IMG and I can hit tab and you can see what happens is it goes ahead and it puts SRC.

Now the great thing with Sublime text is you can see there is a pop up already that happens right here that allows me to just hit tab again and it’ll insert these fields because there’s meet and trim that’s already right there. This is the meet and trims jpeg file that I have.

So I could just hit tab and it’ll insert meet.jpg and that is my image. that is it. So if I go ahead and hit save, right there, and I’ll go ahead and preview my code, you can see there is the link meet. There’s my website. There’s the code. If I go to My Cooking website, there is the picture right there on the website

If I wanted to add that second picture on there, what I could do is again, I’ll go ahead and I’ll do this the long way. Image, SRC, equals hrimp.jpg, closed bracket right there. Control S to save. Go back to the page as it refreshes, there it is.

What if I want this picture to be under the other picture? As you can see it’s right next to one another. Well, that’s where it comes in to know your breaking tags. So again, BBR tag right there, add that in. Go ahead back to the page, hit refresh and you could see it is right under the other one.


	
			My Cooking Website
	

	

Welcome to my cooking website

As we look at these tags, you can see that it’s linking to the same folder that I have. But what if this was in a new folder? Let’s say I created a new folder and I called it Images. I’ll go ahead and I have images right there. I’ll drag this back in there so now you can see I have images right in there.

What happens to my files? Well, take a look. As I refresh things, you can see they are dead or broken, and that’s because they’re not in the right folder.

If you have a structure in this way which we need to do then is add a directory. There will be images and then this one will have images as well. Then I’ll go ahead and hit save because it’s within the images.

Now, I’ll go back to that website and you can see right there. “Welcome to my cooking website”, the images are back and they’re working. That’s how you go ahead and fix the problem.

What happens if they’re a little too big? In my example right there, maybe they’re just a little too big for my taste. So how do I shrink them down? Well, the way you can do this is by including attributes. And attributes are basically things within tags. That’s what we’re going to cover in the next module. But as a basic attribute, one of them would be something like width, and in here it’s based on pixel dimension.

If I go with 200 on this one, and I’ll do width on this one, and I’ll go, let’s say 400 on here, then go ahead and save.


	
			My Cooking Website
	

	

Welcome to my cooking website

As I come back to the page and then as it refreshes, you can see the one right above is 200, and the one below is 400. So you can see it’s twice the size of that. That is only based on width.

The height is automatically calculated and we can cover these topics here shortly in the next module as we get more into attributes.

Image Attributes

Before we get into the attributes section in the next video, there are a few that I want to cover in this section because it’s two images. So if we go ahead and take a look at the Alt attribute — as you can see, as I type in ALT right there — it’s the ALT attribute and it’s a tab.

I can go ahead and type something in. So this is a chicken meat that is grilled. This is basically a description that goes into the image if it’s not able to be displayed.

If I hit refresh there’s nothing really that’s changed at the moment. If I go ahead and refresh that page, you can see there is the ALT attribute right there, but again, nothing has really changed.

What does happen is in fact, as I make changes — let me just say, I changed this meat to meat zero, which means the file will not be found, and now I go ahead and refresh, you could see when the picture is not displayed the text is being shown right there to tell you what that picture or image is about. That’s kind of how that works relative to the HTML code.

That’s why, of course, it’s very important that you link your images properly. If you also have images on the web, this is just a short path that’s related to your server. But if you do have an image, let’s say, somewhere online, that you’re going to use — let me just find one right here — what you can do is paste in the full image address which is a global destination or location.

Here I’m using Pixabay from which you can get images for free over there.


	
			My Cooking Website
	

	

Welcome to my cooking website

this is a chicken meat that is grilled

So I’ll go ahead and paste that link in there and that’s a global image that’s pointing directly to that picture on a specific website. You can do this hot linking to other websites, but typically, you know you’re using their bandwidth when this happens so it’s not really ethical and I don’t recommend it.

When you do this and you now take a look at our page and we go ahead and hit refresh, you can see that picture shows up. If I take another image from — you’ll be able to see here in a second — for this website, and here I’ll show you the example, right here, I want to go ahead and take this picture and copy image address.

Now what I want to do is change this address right here from the shrimp to this address. And as we go back on our cooking website — we go ahead and — let’s just do the HTML first.

We hit refresh and you can see both of these are pointed to the Pixabay. One is the grilled. One is the salmon. Originally, we have the shrimp and the grilled. If I hit F5, now you have the salmon right there. So you can see the URL or the link is very important when it comes to hot linking, or linking the appropriate content on your page. You can of course work with the width attribute right there.

If you’d like to work with both attributes, you can also add a height attribute right there. Let’s just say, I’d do it 25. The problem with working with both attributes is that you need to make sure the ratio is correct because watch what happens now if I go ahead and do 25 on the height.


	
			My Cooking Website
	

	

Welcome to my cooking website

this is a chicken meat that is grilled

You can see that picture is 25. If I change this to 55, you can see it continues to get bigger. If I change this to 95 and save that, then hit refresh, you can see it’s getting bigger.

The problem when you have these two attributes working at the same time is it will give you those exact attributes. Whereas if I just go ahead and get rid of one of them, let’s just say, get rid of this one instead and leave height as 95, it’ll auto fill the other way and now I get the right proportion.

So if height is more important for you to set, then you could set the height and the width will be automatically calculated. If you want the width to be set correctly, you set the width and the height will be automatically set for you.

That’s one tip that you need to kind of keep an eye out especially for images because they can be a little bit worked or distorted as you play or work within your code.

Thanks for Watching

Thanks for joining me in this video. I hope you learned something today. If you did, and you want to subscribe, click that button right here and subscribe so that way you’ll get notified when I release new training videos.

If you want to join me on some premium business training content, where I share with you how to grow your business, monetize your business, and build informational products, there are some premium content that I have available only to my newsletter subscriber members and even some live classes.

You can get the information by getting on my newsletter, by clicking the button right here. Thanks for joining me and I hope to see you in my next lesson.

Resources & Helpful Tools

Sublime Text
FileZilla FTP Client

Download our online toolbox for free! Simply click the get it now button below and see the must-have tools for online business owners!

Struggling to make your blog business profitable? Want to turn your hobby blog into an income-generating blog? Learn the right way to plan a highly successful and profitable blog business.

Learn how to create Pinterest Pins that are attractive, click-worthy, and make people want to click your Pins! Great skill to have to promote your content or make side-income designing Pinterest Pins for others.

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get MyOnline Business Toolbox
 

Had enough of the expensive and useless online business tools?

 

Stop wasting your money and time and get my list of awesome business tools.

 

Just enter your email address below so we know where to send it.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Video Gear Guide for YouTubers

Are you ready to improve your YouTube channel? If you want to see the best YouTube gear for YouTubers, then download my latest gear guide!

 

Enter your email below to get started...

FREE DOWNLOAD

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Wow! Get Ready to Start your Online Business Journey!

Just enter your email address below and be one of the fast growing online businesses roght now!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Get Notified When This Freebie Comes Out! - It Shouldn't Be Long... 

Just enter your email address below and be first to get notified when we release this freebie!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Create Videos that Convert Viewers into Buyers?

Are you tired of making videos that don't produce results?

 

Get my Video Formula cheat sheet and see how to create videos that get clicks and attracts buyers!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My Youtube Video Creation Checklist for FREE...
 

Overwhelmed by number of tasks that you need to do to make high-quality YouTube videos?

 

Then grab this YouTube Video Creation Checklist if a strategic procedure list for producing your YouTube videos.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

This is a List of the 125 Most Profitable YouTube Niches that might be a real eye-opener for you.


Sign up for FREE and gain some extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Profit from My 35 Local Strategies to Make Extra Money
 

Are you interested in making some money on the side? That don't need to be extra hard.

 

You can use My 35 Local Strategies to Make Extra Money and in seriously short time reap the benefits.

 

Grab this opportunity by entering your email below...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

FREE Guide to the Best Cameras for a Youtuber

Eager to find out which cameras are the top choices to producing and recording videos?

 

Grab my FREE Guide below by entering your email address... 

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

225 Profitable Pinterest Niches

Are you interested in learning which Pinterest niches are profitable?

 

Grab our FREE Pinterest Niche Guide by entering your email below

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

How to Get Started Selling Your Own Digital Products

Get my free mini-series by entering your email address below

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Find a Profitable Niche?

If you are interested in starting an online business and want to find the perfect niche to start making tons of money.

 

Then grab our FREE email series on how to find a highly profitable niche!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Want to Get My Quick-Start Guide to Build Your Empire?

If you are interested in starting your own online business and making money online.

 

Then grab our quick email series on how to start a profitable business fast!

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Learn How to Get Thousands of

Visitors to Your Website
 

This FREE email series will show you exactly how to get thousands of real visitors to your website even if you are an absolute beginner.

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

5,000 SUBSCRIBERS

Derek will teach you simple tactics to attract life-long customers through real-world examples.

FOR FREE?

Want to learn how to get

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

Get my list of the 125 Most Profitable YouTube Niches. It will be an eye-opener for you!


Sign up for FREE and get extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

Download My List of The 125 Most Profitable YouTube Niches

Get my list of the 125 Most Profitable YouTube Niches. It will be an eye-opener for you!


Sign up for FREE and get extraordinary ideas...

AWESOME!

In order for you to get your goodies and freebies you have to confirm your email address.

 

To confirm your email address, just go to your email inbox (or check your spam) and click the link that's inside the email that states you want to receive messages from us.

 

That's its!

Just one more thing... 

don't call us.
we will coconut
you

organic pop up market store is heading your way​