HTML & CSS- part 7 Flashcards

1
Q

What’s the non-standard way to indent an unordered list?

A

Indent only the first line of text and make all other lines flush with the bullet:

ul {list-style-position: inside;}

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

In list, what are the markers?

A

Markers are the bullets in an unordered list or the numbers in an ordered list.

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

What options do you have for changing the markers in an UNordered list?

What’s the code?

A

ul {list-style-type: x;}

disc (solid and round)
circle (this is just the outline of a circle)
square

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

What options do you have for changing the markers in an ordered list?

What’s the code?

A

Six pairs:
ol {list-style-type: x;}

decimal—1, 2, 3 etc.
decimal-leading-zero—01, 02, 03

lower-alpha—a, b, c
upper-alpha—A, B, C

lower-roman—i., ii., iii
upper-roman—I, II, III

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

Can you use a picture as a list item marker?

What’s the code?

A

Yes, though it’s not advised.

ul {list-style-image: url(“image address”);}

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

In CSS, what’s the text that goes in front of { called?

A

A CSS selector is everything on the first line that precedes the {.

It’s the part of a style rule that tells the browser what elements, classes, and IDs a rule applies to

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

What does this mean? div > p { ?

A

It selects all <p> that are the child of a <div>

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

In CSS, what is the Universal Selector that selects all the elements on a page?

A

* {

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

In CSS, what is a combinator?

A

A symbol or space…
used in the selector area…
to specify the relationship of the selectors to each other

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

What are the four combinators?

A

(space)
>
+
~

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

What does this combinator mean?
div p {

What’s it called?

A

It selects all <p> elements inside <div> elements.

It’s called the Descendant Selector

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

What does this combinator mean?
div > p {

What’s it called?

A

It selects all <p> elements that are children of a <div> element.

It’s called the Child Selector

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

What does this combinator mean?
div + p {

What’s it called?

A

It selects the first <p> element that are placed immediately after <div> elements.

It’s called the Adjacent Sibling Selector

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

What does this combinator mean?
div ~ p {

What’s it called?

A

It selects all <p> elements that are next siblings of <div> elements.

It’s called the General Sibling Selector

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

What’s a good way to think of a table?

A

Tables are really just rows stacked on top of each other.

You build a table a row at a time, from the top.

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

What are the two and a half main tags in a table, besides <table>?

A

<tr> = Table Row

<th> = Table Heading OR <td> = Table Data

17
Q

If it’s a five column table, then how many items will be in each row?

A

Five

18
Q

How would a column Table Heading look different from a row Table Heading?

A

Column: <th scope="col">Dog</th>

Row: <th scope="row">Dog</th>

19
Q

What does the skeleton of the code for a table look like?

A

<table>
<tr> (indented two spaces)
<th> or <td> (indented four spaces)
</tr> (indented two spaces)
</table>

20
Q

How do you get a Table Heading or Table Data to spread across two columns?

What about two rows?

A

colspan=”2” will span two columns

rowspan=”2” will span two rows

Use these in the <th> or <td> tags