images and attributes Flashcards

1
Q

img

A

The <img></img> element is a special element, and that’s because it doesn’t have any content, and therefore it also doesn’t have a closing tag.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Attributes

A

attributes are basically pieces of data(information) which provide additional information about HTML elements : They Define additional characteristics or properties of the element.; control the behavior of the element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

src

A

Is describing the source from which the browser should basically read the image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Alt

A

Alternative text; some text that should describe what the image is about.

this is very important for various reasons:
- One of them is that it will allow search engines, such as Google Chrome, to actually know what is in the image, because without this description, search engines don’t really have a know of knowing what the image is actually about.

-And second, and probably even more important, is that by specifying the description of the image, we can also allow blind people to use a website. So users who use a screen reader will not see the image, but instead they will have the screen reader read the alternative text, so the description to them. So never skip this attribute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

img warning

A

width and height : Be careful with the use of width and height.
To crop images : Use online tools or software.

💡 We did not specify the image using some content in this element. Instead, what we needed to do was to specify an attribute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly