5 Images Flashcards

1
Q

Add an image

Have text when the image is missing and for screenreaders

A

&ltimg>

src attribute to point to the image location

alt attribute to provide text that describes the image (if image is just decoration leave empty text)

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

Have a title for an image (text that will show up when you highlight it

A

title=”title”

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

Set height and width of image (HTML)

A

height
width
( but images sizes is generally a CSS thing)

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

Make sure the space for the image is there for an image before the image is done loading (HTML)

A

height
width
( but images sizes is generally a CSS thing)

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

What does an image look like when you put it before the &ltp> tag, inside it at the beginning, or inside it in the middle

A

Img is an inline element.

Before, it’s above

In at beginning, on the same line as the text, text at bottom of image.

inside in middle, pushes line above up
(try it out to see)

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

Name some Block elements

A

div
p
h
more: https://www.w3schools.com/html/html_blocks.asp

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

Difference between block and inline element

A

Block elements always start on a newline

Inline elements do not

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

If an image is inline with a paragraph, make it go to the left or right and make text flow above and below it (with HTML, but don’t use it)

A

align attribute
it can be left or right
(don’t use this, use CSS. Just understand this for older code)

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

If an image is inline with a paragraph, make it go to the up, down or middle of the line it is in

A

align attribute
it can be top, middle, bottom
(don’t use this, use CSS. Just understand this for older code)

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

What format should web images be?

A

png, gif, jpeg

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

How big should images be (bigger than they appear?)

What px/inch should you assume

A

Should be the same size as they appear for optimal load times

Also take care of resolution. 72 px/inch

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

When should you use gif, png or jpeg?

Also in terms of transparency

A

jpeg for photos and images with lots of colours
GIF and png for fewer colours (like simple vector images and logos)

Gif alpha is only 1 or 0. Not good for rounded edges or translucency.
png alpha a range but png transparency not compatible with IE6
jpeg no alpha

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

what format for vector images?

A

svg

or canvas elements (make a vector from a rastor)

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

Make images a part of a figure, give caption

A
figure block element
&ltfigure>
Insret the image
Add the figcaption element
(nestable but maybe that's pointless)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly