Which HTML attribute is used to add a border to a table?
A
style B
border C
outline D
frame
Analysis & Theory
`border` is used in HTML to define the width of the table border, like `<table border='1'>`.
What does `<table border='0'>` do?
A
Adds a thick border B
Adds a default border C
Removes the border D
Changes the border color
Analysis & Theory
`border='0'` removes the border from the table.
What is the modern way to add borders to tables in HTML?
A
Using the `border` attribute B
Using CSS `border` property C
Using `<border>` tag D
Using inline JavaScript
Analysis & Theory
The modern and recommended way is to use CSS: `border: 1px solid black;`.
Which CSS property adds a border around table cells?
A
table-border B
border-cell C
border D
outline
Analysis & Theory
`border` adds a border around any element, including table cells.
What does `border-collapse: collapse;` do in a table?
A
Adds rounded corners B
Makes rows collapse C
Merges adjacent cell borders into one D
Removes all borders
Analysis & Theory
`border-collapse: collapse;` merges the borders of adjacent cells.
Which CSS selector targets all `<td>` elements in a table for borders?
A
table td { border: 1px solid black; } B
td.table { border: 1px solid; } C
.td { border: 1px; } D
<td border='1'>
Analysis & Theory
`table td { ... }` applies styles to all `<td>` elements inside a table.
How can you style a table border using inline CSS?
A
<table style='border: solid;'> B
<table border-style='solid'> C
<table border='solid'> D
<table style='outline: 1px;'>
Analysis & Theory
`<table style='border: solid;'>` is the correct way to apply border using inline CSS.
What unit is commonly used for defining border width?
A
kg B
sec C
px D
dpi
Analysis & Theory
Pixels (`px`) are most commonly used to define the thickness of borders.
Which CSS property removes borders between cells without merging them?
A
border-collapse: separate; B
border-spacing: 0; C
border-style: none; D
border-type: clear;
Analysis & Theory
`border-collapse: separate;` keeps cell borders separate and spaced.
Which border style creates a dotted line?
A
border-style: solid; B
border-style: dashed; C
border-style: dotted; D
border-style: double;
Analysis & Theory
`border-style: dotted;` creates a dotted border around the element.