HTML & CSS- part 12 Flashcards

1
Q

When coding a background image, what happens if the image is smaller than what it’s trying to fill?

A

By default it will repeat the image.

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

Use these to control the background image’s location when it’s too small to fit the whole page

A

Repeat— Position— Attachment

background-repeat: (repeat OR no-repeat)

background-position: (left, center OR right), (top, center, or bottom);*** The x-axis is always first

background-attachment: scroll OR fixed;

***If you want it centered along both x and y, just use: background-position: center;

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

How do you show a webpage within a webpage?

A

<iframes>
</iframes>

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

How do you code <iframes>?

A

<iframe src=”https://www.w3schools.com” title=”W3Schools Free Online Web Tutorials”></iframe>

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

How do you embed sound in an HTML page?

A

<audio>
</audio>

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

What are the two audio source formats?

A

mpeg (mp3, mp4) and ogg

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

How do you let someone know that their browser doesn’t support audio?

A

You can add a paragraph inside the audio tags that says “your browser does not supports blah blah”

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

What are the attributes available for audio?

A

autoplay
controls - displays audio controls on the page

<audio controls autoplay>

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

When would you most likely measure in EMs?

A

Typography
margins
padding

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

When would you most likely measure in percentage?

A

Divs
tables
sometimes margins and padding.

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

When would you most likely measure in pixels?

A

images
borders
windows
iframes
fixed, absolute, and relative positioning

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

What does this mean?
position: relative;

A

This changes the location of something relative to the top, bottom, right, etc. of where it is supposed to be.

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

How would you code something so it is nudged 20px to the left of where it’s supposed to be?

A

p {
position: relative;
right: 20px; /* away from the right*/
}

It’s “right” because you are moving away from the right

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

What is the default position option?

A

p {
position: static;
}

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

What are media queries?

A

create different style rules for different screens (cell phones vs. desktops, etc).

AKA Responsive design

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

How do all media queries begin?

A

@media

17
Q

What might a media query say, in plain language?

A

“Is the screen no wider than x pixels and no narrower than y pixels? If so, follow these style rules.”

18
Q

How many different characteristics can a media query test for?

What are some expamples?

A

There are thirteen different media characteristics you can test for in a media query,

Some examples: color and whether the user is looking at a mobile device in portrait or landscape orientation.

19
Q

What is the two most common type of media query?

A

Screen: tests are for a screen of any kind (that is, not a printer)

Width: minimum device width and maximum device width.

20
Q

In media queries, what does “only screen” mean?

A

Only screen means the style rule applies only to devices with screens.

This means it doesn’t apply to printers.