Deck 5: Tables and Css Layout

Full screen (f)
exit full mode
Question
Which of the following should you include within a tbody container?

A) A thead element
B) One or more tr elements
C) A caption element
Use Space or
up arrow
down arrow
to flip the card.
Question
If two CSS rules refer to the same property, the rule that appears first overrides the prior rule's property value.
Question
In rendering a table element, the browser engine will normally determine the width of each column by using the width of that column's widest-content cell.
Question
By default, tables created with the display property are displayed with large gaps between their cells.
Question
To implement a row within a table container, use the ______ element.
Question
How do the purposes of a data table differ from a layout table?
Question
Provide a CSS rule that creates a thick dotted border around all the data cells in a table.
Question
Describe the elements that the following CSS pseudo-class selector matches:
li:nth-of-type(1)
Question
Provide code for a table heading cell that spans three columns.
Question
Why should you normally avoid using a span element as the type for a type selector CSS rule?
Question
To add a title to a <code>table</code> element, you should do which of the following?

A) Apply a CSS rule with the <code>title</code> property
B) Use the <code>table</code> element's <code>title</code> attribute
C) Use the <code>table</code> element's <code>caption</code> attribute
D) Include a <code>caption</code> element within the <code>table</code> container
Question
By default, there is a gap between a table's exterior border and the individual cells' borders, and there's a gap between the borders for adjacent cells. To avoid that gap, you should:

A) apply a CSS rule with the <code>border-collapse: collapse</code> property-value pair.
B) apply a CSS rule with the <code>border-gap: 0</code> property-value pair.
C) add <code>rowspan</code> and <code>colspan</code> attributes to the <code>table</code> element.
D) add a <code>nogap</code> attribute to the <code>table</code> element.
Question
To align the text within a table's data cells so the text is vertically centered, you should use:

A) the <code>td</code> element's <code>rowspan</code> attribute.
B) the <code>td</code> element's <code>colspan</code> attribute.
C) <code>vertical-align: middle</code> within a <code>td</code> type selector rule.
D) <code>center: align</code> within a <code>td</code> type selector rule.
Question
If you want an element to be interpreted as a table caption, you should apply a CSS rule with a <code>display</code> property. Which value should you use for the <code>display</code> property?

A) <code>table-caption</code>
B) <code>heading</code>
C) <code>table-heading</code>
Question
By default, table header cells (<code>th</code>) display their text with center alignment.
Question
By default, table data cells (<code>td</code>) display their text with center alignment.
Question
If you have a <code>table</code> element being used for layout purposes, you should add a <code>role="presentation"</code> attribute to the <code>table</code> element's start tag.
Question
To implement an element within a table row that holds data, use the ______ element.
Question
Web __________ means that disabled users can use the Web effectively.
Question
To help a screen reader to understand a table's content, you can embed a(n) ______ element in the table's <code>caption</code> element.
Question
To create gaps between the table's cells in tables created with the display property, you should apply the border-spacing property to:

A) the table element.
B) the td and th elements.
C) the span elements that serve as table cells.
Question
To turn on absolute positioning, you should apply a CSS rule to the container in which absolute positioning is to take place. In the CSS rule, you should:

A) use an absolute > position child selector.
B) use a position > absolute child selector.
C) use the position: absolute property-value pair.
Question
To center a body element within its html container, you should:

A) use CSS to establish a flexbox layout for the html container and apply the justify?content: center property-value pair to the html container.
B) use CSS to establish a flexbox layout for the body container and apply the justify?content: center property-value pair to the body container.
C) apply the text?align: center property-value pair to the body element.
Question
To match an element by its location within a collection of elements, you can use which of the following?

A) The element's location attribute
B) The element's structural attribute
C) A locator symbol in a CSS rule
D) A structural pseudo-class CSS rule
Question
For an element with a lot of text that uses absolute positioning, if you use the left property, you should also use the width property.
Question
With relative positioning, the left property moves an element to the right by a specified amount.
Question
If you would like a table's caption to display below the table, you should position the table's caption element at the bottom of the table container.
Question
All pseudo-classes start with a colon.
Question
With normal flow, block elements are laid out from top to bottom, one block element per row, and phrasing elements are laid out from _______________ in the available space.
Question
For a table, use a(n) ______ element for a cell that is a description for other cells' content.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Tables and Css Layout
1
Which of the following should you include within a tbody container?

A) A thead element
B) One or more tr elements
C) A caption element
B
2
If two CSS rules refer to the same property, the rule that appears first overrides the prior rule's property value.
False
3
In rendering a table element, the browser engine will normally determine the width of each column by using the width of that column's widest-content cell.
True
4
By default, tables created with the display property are displayed with large gaps between their cells.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
To implement a row within a table container, use the ______ element.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
How do the purposes of a data table differ from a layout table?
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
Provide a CSS rule that creates a thick dotted border around all the data cells in a table.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
Describe the elements that the following CSS pseudo-class selector matches:
li:nth-of-type(1)
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
Provide code for a table heading cell that spans three columns.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
Why should you normally avoid using a span element as the type for a type selector CSS rule?
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
To add a title to a <code>table</code> element, you should do which of the following?

A) Apply a CSS rule with the <code>title</code> property
B) Use the <code>table</code> element's <code>title</code> attribute
C) Use the <code>table</code> element's <code>caption</code> attribute
D) Include a <code>caption</code> element within the <code>table</code> container
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
12
By default, there is a gap between a table's exterior border and the individual cells' borders, and there's a gap between the borders for adjacent cells. To avoid that gap, you should:

A) apply a CSS rule with the <code>border-collapse: collapse</code> property-value pair.
B) apply a CSS rule with the <code>border-gap: 0</code> property-value pair.
C) add <code>rowspan</code> and <code>colspan</code> attributes to the <code>table</code> element.
D) add a <code>nogap</code> attribute to the <code>table</code> element.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
To align the text within a table's data cells so the text is vertically centered, you should use:

A) the <code>td</code> element's <code>rowspan</code> attribute.
B) the <code>td</code> element's <code>colspan</code> attribute.
C) <code>vertical-align: middle</code> within a <code>td</code> type selector rule.
D) <code>center: align</code> within a <code>td</code> type selector rule.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
If you want an element to be interpreted as a table caption, you should apply a CSS rule with a <code>display</code> property. Which value should you use for the <code>display</code> property?

A) <code>table-caption</code>
B) <code>heading</code>
C) <code>table-heading</code>
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
By default, table header cells (<code>th</code>) display their text with center alignment.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
By default, table data cells (<code>td</code>) display their text with center alignment.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
If you have a <code>table</code> element being used for layout purposes, you should add a <code>role="presentation"</code> attribute to the <code>table</code> element's start tag.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
To implement an element within a table row that holds data, use the ______ element.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
Web __________ means that disabled users can use the Web effectively.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
To help a screen reader to understand a table's content, you can embed a(n) ______ element in the table's <code>caption</code> element.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
To create gaps between the table's cells in tables created with the display property, you should apply the border-spacing property to:

A) the table element.
B) the td and th elements.
C) the span elements that serve as table cells.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
To turn on absolute positioning, you should apply a CSS rule to the container in which absolute positioning is to take place. In the CSS rule, you should:

A) use an absolute > position child selector.
B) use a position > absolute child selector.
C) use the position: absolute property-value pair.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
To center a body element within its html container, you should:

A) use CSS to establish a flexbox layout for the html container and apply the justify?content: center property-value pair to the html container.
B) use CSS to establish a flexbox layout for the body container and apply the justify?content: center property-value pair to the body container.
C) apply the text?align: center property-value pair to the body element.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
To match an element by its location within a collection of elements, you can use which of the following?

A) The element's location attribute
B) The element's structural attribute
C) A locator symbol in a CSS rule
D) A structural pseudo-class CSS rule
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
For an element with a lot of text that uses absolute positioning, if you use the left property, you should also use the width property.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
With relative positioning, the left property moves an element to the right by a specified amount.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
If you would like a table's caption to display below the table, you should position the table's caption element at the bottom of the table container.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
All pseudo-classes start with a colon.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
With normal flow, block elements are laid out from top to bottom, one block element per row, and phrasing elements are laid out from _______________ in the available space.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
For a table, use a(n) ______ element for a cell that is a description for other cells' content.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 30 flashcards in this deck.