CSS Flashcards

1
Q

What is CSS used for?

A

Style

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

Where does CSS go?

A

A separate file

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

How do you link your CSS in your HTML document?

A

<link></link>

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

Css Syntax

A

Look up CSS Syntax on MDN

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

What are the different ways to input color in css?

A

h1{
color: red;
}
h2{
color: #FF0000;
}
p{
color: rgba(255,0,0,1);
}
span{
color: hsla(0, 100%, 50%, 1);
}

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

What is a parent child relationship?

A

A child is an element that is related to another element. For example

<section>
<p>Hello</p>
</section>

The p tag is a child of the parent section.

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

How would you tag a parent child relationship

A

section p {
color: red;
}

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

How would you tag a DIRECT parent child relationship

A

section > p {
color: red;
}

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

What is a sibling relationship?

A

Siblings are tags that are both under the same parent tag. For example

<section>
<p>Hello</p>
<p>Goodbye</p>
</section>

The two paragraphs are siblings.

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

How would you tag a sibling relationship in CSS

A

p + p {
color: red;
}

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

What are IDs used for

A

Selecting distance elements

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

How many IDs can be used with the same value

A

One

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

What are Classes used for

A

Selecting multiple elements

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

How many Classes can be used with the same value

A

Multiple

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

What is specificity

A

Specificity is how many value points something has. If something has a higher value than something else, it can override it since the code thinks its more important.

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

How many specificity points does a tag have?

A

1

17
Q

How many specificity points does a Class have?

A

10

18
Q

How many specificity points does an ID have

A

100

19
Q

How many specificity points does a !important have

A

1000

20
Q

What is a em?

A

It is a type of font size that is equal to the value of its direct parent. For example if your section is the direct parent with a font of 10 and the paragraph is its direct child with a 1em font size, it is 10px of font.

21
Q

What is a rem?

A

Its is a type of font size that is directly taken from the html element