(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024, Exams of Computer Science

(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024(Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024

Typology: Exams

2023/2024

Available from 07/15/2024

VanGruut
VanGruut 🇺🇸

3.3

(13)

925 documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
INTERMEDIATE HTML & CSS
Tables
KNOWLEDGE ASSESSMENT GUIDE
2024
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download (Intermediate HTML & CSS) Tables Knowledge Assessment Guide 2024 and more Exams Computer Science in PDF only on Docsity!

INTERMEDIATE HTML & CSS

Tables

KNOWLEDGE ASSESSMENT GUIDE

  1. Which HTML element is used to define a table header?
    • a) ``
    • b) ``
    • c) ``
    • d) ``
    • Answer: a) ``
    • Rationale: The `` element is used to define a header cell in an HTML table.
  2. What attribute is used to merge two or more cells horizontally in a table?
    • a) rowspan
    • b) colspan
    • c) merge
    • d) span
    • Answer: b) colspan
    • Rationale: The colspan attribute is used to merge cells horizontally in an HTML table.
  3. Which CSS property is used to set the space between the border of a table cell and its content?
    • a) border-spacing
  • Rationale: The `` element is used to group the body content in an HTML table.

Fill-in-the-Blank Questions

  1. The __________ attribute in the `` tag specifies the width of the table.
  • Answer: width
  • Rationale: The width attribute specifies the width of the table.
  1. To create a table with a border, you use the __________ attribute in the `` tag.
  • Answer: border
  • Rationale: The border attribute is used to create a table with a border.
  1. The __________ element is used to define a table row.
  • Answer: ``
  • Rationale: The `` element is used to define a row in an HTML table.
  1. In CSS, the __________ property is used to set the distance between the borders of adjacent cells.
  • Answer: border-spacing
  • Rationale: The border-spacing property sets the distance between the borders of adjacent cells.
  1. The __________ attribute in the `` tag specifies the number of rows a cell should span.
  • Answer: rowspan
  • Rationale: The rowspan attribute specifies the number of rows a cell should span.

True/False Questions

  1. The `` element is used to add a title to an HTML table.
  • Answer: True
  • Rationale: The `` element is used to add a title to an HTML table.
  1. The cellpadding attribute is used to set the space between the cell content and its border.
  • Answer: True
  • Rationale: The cellpadding attribute sets the space between the cell content and its border.
  1. The `` element is used to group the footer content in an HTML table.
  • Answer: True
  • Rationale: The border-width property sets the width of the table borders.
  1. What is the default value of the border-collapse property in CSS?
  • a) collapse
  • b) separate
  • c) none
  • d) merge
  • Answer: b) separate
  • Rationale: The default value of the border-collapse property is separate.
  1. Which HTML element is used to define a table cell?
  • a) ``
  • b) ``
  • c) ``
  • d) ``
  • Answer: a) ``
  • Rationale: The `` element is used to define a table cell.
  1. Which attribute is used to specify the alignment of the content inside a table cell?
  • a) align
  • b) valign
  • c) justify
  • d) center
  • Answer: a) align
  • Rationale: The align attribute specifies the alignment of the content inside a table cell.
  1. What does the table-layout property control in CSS?
  • a) The layout algorithm used to arrange the table cells
  • b) The spacing between table cells
  • c) The width of the table borders
  • d) The height of the table rows
  • Answer: a) The layout algorithm used to arrange the table cells
  • Rationale: The table-layout property controls the layout algorithm used to arrange the table cells. Multiple Choice: Which HTML element is used to define a table? A. B. C. D.

Correct Answer: A

Rationale: The border-collapse property is used to determine how table borders are collapsed into a single border or separated in a table. Fill-in-the-Blank: The scope attribute in the element is used to specify the _ of a header cell.

Correct Answer: Scope

Rationale: The scope attribute in helps define whether a header cell applies to a row, column, group, or the entire table. True/False: The element is used to create a title for a table. (True/False)

Correct Answer: True

Rationale: The element is used to provide a title or description for a table, improving accessibility and user understanding. Multiple Choice: Which HTML attribute is used to merge two or more cells in a table? A. rowspan B. colspan C. merge-cell D. cell-merge

Correct Answer: B

Rationale: The colspan attribute is used to merge cells horizontally in a table, allowing for the creation of more complex layouts. Fill-in-the-Blank: The CSS property _ is used to set the spacing between the border and content of a table cell.

Correct Answer: padding

Rationale: The padding property controls the space between the content of a table cell and its border, helping to improve readability and aesthetics. True/False: The element is used to define the footer of a table. (True/False)

Correct Answer: True

Rationale: The element is used to represent the footer section of a table, typically containing summary or metadata information. Multiple Choice: Which CSS property is used to set the background color of a table row? A. row-color B. background-color C. row-background D. bgcolor

Correct Answer: B

Correct Answer: A

Rationale: The id attribute is used to provide a unique identifier for elements in HTML, including table rows, facilitating targeted styling and scripting. Fill-in-the-Blank: The border-collapse property with a value of _ ensures that adjacent cells share borders in a table.

Correct Answer: collapse

Rationale: Setting the border-collapse property to collapse ensures that adjacent cells in a table share borders, creating a seamless visual appearance. True/False: The element is mandatory in an HTML table structure. (True/False)

Correct Answer: False

Rationale: The element is optional in an HTML table structure, used to group the body content of a table for styling or scripting purposes. Multiple Choice: Which CSS property is used to set the alignment of text within a table cell? A. text-align B. cell-align C. align-content

D. text-justify

Correct Answer: A

Rationale: The text-align property in CSS is used to control the alignment of text within elements, including table cells for improved readability. Fill-in-the-Blank: The element is used to define the _ of a table.

Correct Answer: Table Header

Rationale: The element represents the header section of a table, containing column labels or headings for better organization. True/False: The element is used to define table data cells in HTML. (True/False)

Correct Answer: True

Rationale: The element is specifically used to define regular data cells within a table, containing the main content of the table. Multiple Choice: Which CSS property is used to set the border color of a table? A. border-color B. color C. border-style

  1. Which CSS property is used to set the space between the borders of adjacent table cells? a) cell-spacing b) border-spacing c) cell-padding d) margin-spacing

Answer: b) border-spacing

Rationale: The border-spacing property specifies the distance between the borders of adjacent cells in a table.

  1. What HTML attribute makes a table cell span more than one column? a) rowspan b) colspan c) span d) merge

Answer: b) colspan

Rationale: The colspan attribute allows a table cell to span across multiple columns.

  1. In CSS, which property is used to collapse the borders between table cells? a) border-collapse b) border-spacing

c) collapse d) table-border

Answer: a) border-collapse

Rationale: The border-collapse property specifies whether table borders should be collapsed into a single border or separated.

  1. Which attribute specifies the number of rows in a cell to be merged? a) colspan b) span c) table-merge d) rowspan

Answer: d) rowspan

Rationale: The rowspan attribute makes a table cell span across multiple rows.

Fill-in-the-Blank

  1. The `` element in an HTML table is used to add a __________ to the table.

Answer: caption

Rationale: The `` element provides a title or summary for the table.

  1. Setting the CSS property table-layout: fixed causes the table to render at its natural width and height.

Answer: False

Rationale: table-layout: fixed sets a fixed layout algorithm where the width of the table and its columns do not change dynamically with the content, rather they are defined by the widths specified on `` or the first row's cells.

  1. The element must always include, , and tags to be valid.

Answer: False

Rationale: While ,, and are useful for semantic structure, they are not required for a table to be valid. A table can work with just and other associated elements.

  1. The CSS border-spacing: 0 property will remove all spacing between table cells.

Answer: True

Rationale: The border-spacing property specifies the distance between the borders of adjacent cells, and setting it to 0 will remove all spacing between them.

  1. Using the rowspan attribute on a `` element adjusts the height of the table accordingly.

Answer: True

Rationale: The rowspan attribute makes a cell span multiple rows, effectively changing the height of the table to accommodate this span.

  1. To style an individual column, you can use the `` element along with CSS.

Answer: True

Rationale: The `` element represents one or more columns in a table and can be used to apply styles to a specific column using CSS.

Multiple Choice

  1. Which of the following elements specifies a group of one or more columns in a table for styling purposes? a) b) c) d)

Answer: a) ``

Rationale: The `` element is used to group columns within a table and apply styles to them.

  1. Which of the following CSS properties is used to set the alignment of the content within a table cell? a) text-align