Midterms - Cascading Style Sheets Flashcards

1
Q

combinator matches all elements that are descendants of a specified element.

A

descendant (space)

div p {
  background-color: yellow;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

combinator selects all elements that are the children of a specified element.

A

Child Combinator (>)

div > p {
  background-color: yellow;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

combinator is used to select an element that is directly after another specific element

A

Adjacent Sibling Combinator (+)

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

combinator selects all elements that are next siblings of a specified element.

A

General sibling combinator (~)

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

is used to define a special state of an element.

A

pseudo-class

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

The syntax of pseudo-classes:

A
selector:pseudo-class {
  property: value;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

pseudo-class matches a specified element that is the first child of another element.

A

:first-child

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

pseudo-class allows you to define special rules for different languages

A

:lang

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

is used to style specific parts of an element.

A

pseudo-element

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

The syntax of pseudo-elements:

A
selector::pseudo-element {
  property: value;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

pseudo-element is used to add a special style to the first line of a text.

A

::first-line

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

pseudo-element is used to add a special style to the first letter of a text.

A

::first-letter

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

pseudo-element can be used to insert some content before the content of an element.

A

::before

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

pseudo-element can be used to insert some content after the content of an element.

A

::after

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

pseudo-element selects the markers of list items.

A

::marker

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

pseudo-element matches the portion of an element that is selected by a user.

A

::selection

17
Q

property specifies the opacity/transparency of an element.

A

opacity

img {
  opacity: 0.5;
}
18
Q

is basically a list of links, so using the <ul> and <li> elements

A

navigation bar

 <ul>
  <li><a href="default.asp">Home</a></li>
  <li><a href="news.asp">News</a></li>
  <li><a href="contact.asp">Contact</a></li>
  <li><a href="about.asp">About</a></li>
</ul> 
19
Q

Displaying the links as block elements makes the whole link area clickable

A

display: block

20
Q

selector is used to select elements with a specified attribute and value.

A

[attribute=”value”]

21
Q

selector is used to select elements with an attribute value containing a specified word.

A

[attribute~=”value”]

22
Q

selector is used to select elements with the specified attribute, whose value can be exactly the specified value, or the specified value followed by a hyphen (-)

A

[attribute|=”value”]

23
Q

selector is used to select elements with the specified attribute, whose value starts with the specified value.

A

[attribute^=”value”]

24
Q

selector is used to select elements whose attribute value ends with a specified value.

A

[attribute$=”value”]

25
Q

selector is used to select elements whose attribute value contains a specified value.

A

[attribute*=”value”]