A Picture's Worth a Thousand Moans

7 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€66.45
List Price:  €94.93
You save:  €28.48
£55.32
List Price:  £79.03
You save:  £23.71
CA$98.04
List Price:  CA$140.06
You save:  CA$42.02
A$107.72
List Price:  A$153.89
You save:  A$46.17
S$94.09
List Price:  S$134.42
You save:  S$40.33
HK$544.68
List Price:  HK$778.15
You save:  HK$233.46
CHF 61.92
List Price:  CHF 88.46
You save:  CHF 26.54
NOK kr774.79
List Price:  NOK kr1,106.89
You save:  NOK kr332.10
DKK kr495.67
List Price:  DKK kr708.13
You save:  DKK kr212.46
NZ$118.82
List Price:  NZ$169.76
You save:  NZ$50.93
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,339.40
List Price:  ৳11,913.94
You save:  ৳3,574.54
₹5,914.23
List Price:  ₹8,449.26
You save:  ₹2,535.03
RM311.24
List Price:  RM444.65
You save:  RM133.41
₦118,083.62
List Price:  ₦168,698.12
You save:  ₦50,614.50
₨19,391.36
List Price:  ₨27,703.14
You save:  ₨8,311.77
฿2,410.17
List Price:  ฿3,443.25
You save:  ฿1,033.08
₺2,423.71
List Price:  ₺3,462.60
You save:  ₺1,038.88
B$418.75
List Price:  B$598.25
You save:  B$179.49
R1,273.04
List Price:  R1,818.71
You save:  R545.66
Лв129.87
List Price:  Лв185.54
You save:  Лв55.66
₩97,732.12
List Price:  ₩139,623.30
You save:  ₩41,891.18
₪255.55
List Price:  ₪365.09
You save:  ₪109.53
₱4,110.61
List Price:  ₱5,872.56
You save:  ₱1,761.94
¥10,630.43
List Price:  ¥15,186.98
You save:  ¥4,556.55
MX$1,418.07
List Price:  MX$2,025.91
You save:  MX$607.83
QR254.36
List Price:  QR363.39
You save:  QR109.02
P953.37
List Price:  P1,362.02
You save:  P408.64
KSh9,063.70
List Price:  KSh12,948.70
You save:  KSh3,885
E£3,478.89
List Price:  E£4,970.06
You save:  E£1,491.16
ብር8,820.94
List Price:  ብር12,601.88
You save:  ብር3,780.94
Kz63,759.63
List Price:  Kz91,089.09
You save:  Kz27,329.46
CLP$68,404.72
List Price:  CLP$97,725.22
You save:  CLP$29,320.50
CN¥507.53
List Price:  CN¥725.08
You save:  CN¥217.54
RD$4,206.74
List Price:  RD$6,009.89
You save:  RD$1,803.14
DA9,351.13
List Price:  DA13,359.34
You save:  DA4,008.20
FJ$158.85
List Price:  FJ$226.94
You save:  FJ$68.09
Q538.41
List Price:  Q769.20
You save:  Q230.78
GY$14,600.65
List Price:  GY$20,858.96
You save:  GY$6,258.31
ISK kr9,615.92
List Price:  ISK kr13,737.62
You save:  ISK kr4,121.70
DH699.24
List Price:  DH998.96
You save:  DH299.72
L1,281.52
List Price:  L1,830.82
You save:  L549.30
ден4,084.06
List Price:  ден5,834.63
You save:  ден1,750.56
MOP$559.24
List Price:  MOP$798.95
You save:  MOP$239.71
N$1,266.15
List Price:  N$1,808.86
You save:  N$542.71
C$2,568.06
List Price:  C$3,668.81
You save:  C$1,100.75
रु9,427.87
List Price:  रु13,468.97
You save:  रु4,041.09
S/262.66
List Price:  S/375.25
You save:  S/112.58
K281.39
List Price:  K402.01
You save:  K120.61
SAR262.91
List Price:  SAR375.60
You save:  SAR112.69
ZK1,903.42
List Price:  ZK2,719.29
You save:  ZK815.86
L330.70
List Price:  L472.45
You save:  L141.75
Kč1,679.39
List Price:  Kč2,399.23
You save:  Kč719.84
Ft27,552.80
List Price:  Ft39,362.83
You save:  Ft11,810.03
SEK kr765.72
List Price:  SEK kr1,093.94
You save:  SEK kr328.21
ARS$70,549.59
List Price:  ARS$100,789.45
You save:  ARS$30,239.85
Bs482.26
List Price:  Bs688.98
You save:  Bs206.71
COP$307,907.55
List Price:  COP$439,886.78
You save:  COP$131,979.23
₡35,643.95
List Price:  ₡50,922.11
You save:  ₡15,278.16
L1,765.02
List Price:  L2,521.57
You save:  L756.54
₲545,488.80
List Price:  ₲779,303.12
You save:  ₲233,814.31
$U2,997.83
List Price:  $U4,282.79
You save:  $U1,284.96
zł286.31
List Price:  zł409.03
You save:  zł122.72
Already have an account? Log In

Transcript

So one of the things you're probably going to want to put in your articles and such are images. So first of all, images are added using the HTML image tag. It's a void tag. So there's no closing tag, you'd use the source attribute to tell the browser where to load the image from. And then there's also an alt attribute, which is used to give a description of the content. It's particularly great for screen readers in search engines, because they just can't access the content of the image otherwise.

But it is important that you add alt text to help make it accessible to anyone who has low or no vision. So you've got your image tag, your source attribute, in this case is zombie dot png. If it were in a different folder, you would start with you know, whatever that folder is, or the path to that folder, then zombie dot png. If it's in the same folder, then you can just use that. You can also pull something in from elsewhere using the full URL. If you had that as well.

The old text is just going to be text about the image in this case Alone zombies searching for his hoard. It's also important to know that you don't want to say like images or graphics, because that's already inherent in that it's an image, a screen reader is going to say that it's an image before it reads the alt text. You do a lot of things with size on images, there's height and width attributes that you can set to determine what the size should be. It is generally better to do it in CSS, which we'll get to eventually, but you can do it in in your HTML as well. So if you try to make an image larger, using the height, width, that you're going to degrade the quality because you're spreading the information over a larger area. It's kind of like if you have a human resistance, so fighting zombies, and you spread them too thin against the zombie horde, they're not gonna be as effective, they're not gonna do as well, because they're spread too thin.

You can make the image smaller, and we'll leave the quality intact, the problem is still gonna be the same file size. So if you have a 10 meg image, and you shrink it down, so it's only like 100 pixels by 100 pixels. It's going to look really small, but it's still going to take Whole 10. Meg's to download to look right. So it's often best to have the exact height and width of the image that you're using in order to prevent sort of over downloads or lower quality. And if you change the height and width just at random, without preserving the aspect ratio or without doing so, proportionately, it's going to squash or stretch the image, and it just doesn't look good.

Unless it's a zombie, then you can squash and stretch them all you want. As I said before, ideally the image should be its natural size to get the best balance between the smallest file size and best quality. Okay, so let's talk about the different types of images you can use on websites. First of all, there's GIF stands for graphic Interchange Format, and I pronounce it GIF. A lot of people on the internet would say that I'm wrong, but I would say that it's not graphics, so it's not GIF. It's GIF, but it's up to you as to how you want to, on which side you want to fall in that fight.

Gifts work in all browsers. They allow animation which is one of the reasons while they're still around, a lot of the animations you see on the web are often in GIF. Particularly up until recently, though, there's a lot of new stuff going on with CSS animation that allows those to be done natively, as opposed to just in GIFs. GIFs. also allow for transparency, which is helpful to the transparency isn't always as good. And sometimes it's a little crunchy or, or shows more of the edge than you want to.

It is a lossy format, meaning that when you save as GIF, you're losing information. So it's not keeping all the information so you're sort of degrading quality a little bit, but the benefit you're getting is that you get a smaller file size, which takes less time to download. So it's a balance between high quality or quality of image and size of image. gif works particularly well with large swatches of color such as logos or line art. jpg stands for joint photographic experts group. It works in all browsers does not allow for animation has no transparency.

Allowed for it. And it is also a lossy compression. But it is super great for photographs and does a much better job of compressing them than a gift does. And so it really shines and photographs and other complex imagery. png stands for Portable Network graphics. And it is sort of the newest of the standards, but still works in just about all browsers.

You have to go pretty far back to find a browser that doesn't work in it does not allow animations, but it does allow high quality transparency. So if you ever need transparency behind an image, you want to use a PNG. It is a lossless compression, at least at the PNG 24 the PNG eight is lossy. What's great about that is that you are keeping all of the the information there you're just sort of compressing it into a smaller box as opposed to getting rid of some of the information so that if it's smaller boxes speak it's algorithms are particularly good on the same thing that gifts are good on. things with large spots of color logos, line art, those sorts of things, but it can be used on it. SPG is probably the newest of these standards, or at least the one he was wanting to be standardized stands for Scalable Vector graphics.

It works natively in most browsers. But you can also use it within an image tag in older browsers. So it still works there as well. You can also use it as an image tag in more modern browsers. But natively sometimes has some better benefits like access to CSS and things like that. It supports animation and animation via CSS.

It also supports transparency. And it scales up and down without any loss in quality. svg graphics are what's called vector. And so they can be there. Similarly, again, more line art and logo sort of things. But you can scale them up and down without any loss of quality because they're based on math rather than on pixels.

Generally, a very small file size. He uses tags much like HTML, which is when I was talking about it being native. I'm talking about using the tags directly in your HTML, as opposed to importing an SVG file through an image tag or something like that. Again, best with line art logos, icons, those sorts of things. Now there is another tag that we sometimes use for images, not directly for images, but usually surrounding images. It's called the figure tag.

And it's mainly a container element for graphics, tables, charts, all those sorts of things. And it should be self contained but relate to the main content. So it's, I mean, this is particularly what you would see with different papers and things where you would have a figure that supports the data or, or shows the data, or supports the conclusions, etc, etc. So the figure element allows for that it's best used for descriptive information supports the text around it. And another element fake caption allows you to add a caption to the figure, okay, here's a live image tag. So we have image, we have our source.

This is where we're finding it from. We have our alt text. If we wanted to put this in a figure, we would just add the figure tag closing it with the figure Then if we wanted to say, add a caption, we could do that. Okay. All right, and then we have a figure. Let's move on to the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.