HTML Tables
- Which of the following does not specify a column width?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
We can specify column width in three ways i.e. Percentage, Fixed, Proportional. Fixed width is given in pixels. Percentage specification is the percentage of horizontal space availability in the table. The proportional specification is the portions of fixed horizontal space required for the table.
- border-spacing is given in _____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
border-spacing and border-collapse are the two properties by which one can set the border and its styling in a table. We give its value in pixels.
- Borders can’t be applied on ________________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Borders can’t be applied on <tr> elements. It can’t be applied on table structural elements. For setting borders with <tr> element, border-collapse property should be set to collapse.
- Which attribute defines numbers of columns in a group?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
span=number[CN] attribute’s value must be an integer and greater than 0. It specifies the number of columns in a group. When span attribute is not in use, colgroup defines a single column group containing one column. width=multi-length[CN] specifies default width of for every column. scope=scope-name[CN] specifies set of data cells for which going header cell gives header information. The headers=idrefs[CN] provides list of header cells that gives header information.
- For adding caption to the table we use ____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
For adding caption to the table we use <caption> tag. It should be used just below the <table> tag.Syntax is
<table>
<caption> Savings </caption>
<tr> <th> saving </th><th>loss</th> </tr> <tr><td>$12</td>$45<td></td> </tr>
</table>.
<thead> tag contains the group of header. <tr> is used to indicate start of every row i.e. it stands for table row. The header information is present in <th> tag.