Prelims - CSS (Syntax&Selectors) Flashcards

1
Q

describes how HTML elements are to be displayed on screen, paper, or in other media

A

Cascading stylesheets (CSS)

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

CSS syntax

A

h1 { color:blue; font-size:12px}

selector { declaration; declaration}

declarations consist of the property (color) and value (blue)

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

points to the HTML element you want to style

A

selector

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

includes a CSS property name and a value, separated by a colon

A

declaration

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

selects HTML elements based on the element name

A

CSS element selector

p {
  text-align: center;
  color: red;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

selector uses the id attribute of an HTML element to select a specific element

A

CSS id Selector

#para1 {
  text-align: center;
  color: red;
}

An id name cannot start with a number!

The id of an element is unique within a page, so the id selector is used to select one unique element

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

To select an element with a specific id, write a ____ character, followed by the id of the element

A

#

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

selects HTML elements with a specific class attribute

A

CSS class Selector

.center {
  text-align: center;
  color: red;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

To select elements with a specific class, write a ____ character, followed by the class name

A

.

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

selects all HTML elements on the page

A

The CSS Universal Selector

* {
  text-align: center;
  color: blue;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

To select all HTML elements on the page use the ____ character

A

*

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

selects all the HTML elements with the same style definitions

A

CSS Grouping Selector

h1, h2, p {
  text-align: center;
  color: red;
}

(the h1, h2, and p elements will have the same style definitions)

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