CSS3 - Sheet1 Flashcards

1
Q

What is a Selector?

A
A selector is a tag, pseudo class or pseudo element that 
selects one or more elements of the document for formating.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Declaration Block?

A

A declaration block constains the one or more formating instructions for the element(s) selected by the Selector.
The declarion block begins with a { and ends with a }.

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

What is a Declaration?

A

A declaration is a formating instruction

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

A Type selector is also know as …?

A

An elemement selector

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

Describe the Class selector and its syntax

A
Syntax: .ClassName
The class selector selects an element based on the class attribute's value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
Why would use multiple Class names in HTML's class attribute? 
What's the syntax?
A
This approach allows you to group common styles in a base style definition and enchance the definition for more specific cases.
Syntax:  .... 
List the class names separated by spaces. CSS will combine the class names to create a  single style.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe the ID selectorand its syntax

A

Syntax: #IDName

The ID selector selects an element based on the value of the ID attrbibute

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

Describe the Group selector and its syntax

A

Syntax: Tag1, Tag2, .ClassName, #IDName {…}
List the selectors separated by commas.
The Group selector allow you to apply a single style to multiple selector types.

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

Describe the Attribute selector and its syntax

A

Syntax: Type | Class selector[ attributename [= value] ]
The attribute selector selects an element based on the attributes name and optionally the attributes value.
The attribute selector works with Type and Class selectors to refine the selection.
The atrribute selector supports value filtering
Begins with ^ - tagname^ = “value”
Ends with $ - tagname$ = “value”
Contains * - tagname* = “value”

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

Describe the universal selector and its syntax

A

Syntax: *
The Universal selector selects all elements on a page or within the defined scope.
The Universal selector can be used with the descendant selector.
Some web designers use the Universal selector to remove/reset the spacing on a page.

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

Describe the Descendent selector and its syntax

A

Syntax: Selector1 Selector3 Selector5 {…}
The Descendent selector selects items whose ancestors match the listed selectors.
Ancestor selectors do not have to be immediate parents of the listed child selector.

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

Describe the Child Selector and its syntax

A

Syntax: selector1 > selector2 [ > selector3]
The Child selector selects child items based on their parent items.
The > acts as a child selector. Examples: H1>P, H2>Article>Section

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

Describe the Child Selector pseudo-classes

A

The Child Selector supports the following psuedo-classes
:First-Child
:Last-Child
:Only-Child
:Nth-Child( odd | even | 0-9 | 0-1n [+ StartingElemenetNumber] )
type:First-of-Type
type:Last-of-Type
type:Nth-of-Type( odd | even | 0-9 | 0-1n [+ StartingElemenetNumber] )

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

Is the following legal? Nth-Child( -4n+10)?

A

Yes. It means select the 10th child and and then every 4th child item before it

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

What is a Child Type selector?

A

It’s a child selector that allows you to specify the child item’s type

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

Describe the Adjacent selector and its syntax

A

Syntax: Selector1 + Selector2

The Adjacent selector selects an tag based on the tag of it’s sibling that immediately preceeds it.

17
Q

What are the pseudo-classes for the A (anchor) tag?

A

a: link
a: visited
a: hover
a: active

18
Q

What are the pseudo-elements?

A

:first-letter

:first-line

19
Q

What are the pseudo-classes?

A

:Focus
:Before
:After
::Selection

20
Q

What two attributes does the pseudo-class selector ::Selection support?

A

color

background-color