HTML Tables Question Bank
- Categories Web Designing, HTML, HTML
This post contains 1 mark questions on the topic of HTML Tables in the form of MCQs, fill in the blanks and true or false statements.
Multiple Choice Questions:
- Which of these tags belong to table?
- <thead>,<body>,<tr>
- <table>,<head>,<tfoot>
- <table>,<tr>,<td>
- <table>,<tr>,<tt>
Ans. 3
- Which of the following tags gives a caption to the table?
- <caption>
- <head>
- <heading>
- None of these
Ans. 1
- Which of the following is used to specify the beginning of a table’s row?
- <td>
- <tr>
- <row>
- <tt>
Ans. 2
- HTML tag for row is
- <colspan>
- <tr>
- <rowspan>
- <td>
Ans. 2
- Which tag is used to add columns in the tables?
- <colspan>
- <td>
- <tr>
- None of these
Ans. 2
- This tag is used to specify the individual table data in a table.
- <tr>
- <td>
- <th>
- <table>
Ans. 2
- In order to add border to a table, border attribute is specified in which tag?
- <th>
- <table>
- <td>
- <tr>
Ans. 2
- The attribute used to set the border color of a table is
- border
- bordercolor
- color
- border color
Ans. 2
- Which of the following is an attribute of < table > tag?
- src
- cellpadding
- link
- bold
Ans. 2
- Which one of the following is not an option for aligning data in a table?
- justify
- right
- left
- center
Ans. 1
- Which attribute of the < table > tag is used to set an image in the background of a table?
- bgcolor
- background
- frame
- rules
Ans. 2
- The attribute used to specify the background cofor of a table is
- background
- bgtable
- color
- bgcolor
Ans. 4
- The two common attributes of the <img> and the <table> tag are
- src and height
- height and width
- border and src
- they do not have any common attributes
Ans. 2
- border, frame, cellspacing, cellpadding, align are the attributes of
- Body
- Head
- Table
- None of these
Ans. 3
- Which of the following is not an attribute of < table > tag?
- border
- background
- bgcolor
- src
Ans. 4
- In the <td> tag, td stands for
- Table Data
- Table Definition
- Table Design
- None of these
Ans. 1
- What is the correct HTML code to left align the content inside a table cell?
- <td valign = “left”>
- <td align = “left”>
- <td left align>
- <td left>
Ans. 2
- Choose the correct HTML code to right align the content inside a table cell.
- <td align = “right”>
- <td valign = “right”>
- <td right=”align”>
- None of the above
Ans. 1
- Combining two or more cells in a table on a Web page is called
- merging
- spanning
- combining
- None of these
Ans. 2
- Which attribute tells, how many rows a cell should span?
- colspan
- rowspan
- Both (a) and (b)
- None of these
Ans. 2
- rowspan can be added to which tag?
- <hr>
- <table>
- <td>
- <tr>
Ans. 3
- Which attribute of <td> tag is used to merge two or more columns to form a single column?
- colspan
- cellspacing
- cellpadding
- rowspan
Ans. 1
- colspan can be added to which tag?
- <hr>
- <table>
- <td>
- <tr>
Ans. 3
- Which attribute helps to align data vertically in a single cell.
- align
- valign
- halign
- format
Ans. 2
- To add rows to a table we use __________ tag .
- <TD>
- <TROW>
- <TR>
- <ROW>
Ans. 3
- _________ tag is used to speciy the rows in a table.
- <TR>
- <TD>
- <TH>
- <TABLE>
Ans. 1
- The tag to create a table is __________
- <table>
- <caption>
- <td>
- <tr>
Ans. 1
- What tag is used to add columns to table ?
- <th>
- <td>
- <tr>
- <tc>
Ans. 2
- Which of the following is not an attribute of the <Table >tag
- BGCOLOR
- WIDTH
- BORDER
- SRC
Ans. 4
- The _________ Tag is used to specify the table heading cell
- <TR>
- <TD>
- <TH>
- <TABLE>
Ans. 3
State whether the following statements are true or false:
- A cell is an intersection of a row and a column.
Ans. True
- The cellpadding attribute is used with <td> tag.
Ans. False
- <caption> is placed just above the <table> tag.
Ans. False
- <td> will make the text bold.
Ans. False
- The border is an attribute of <a> tag.
Ans. False
- The default value of border attribute is 1.
Ans. False
- The cols value in the rules attribute, allows you to display table border only between columns.
Ans. True
- The cellspacing attribute tells the browser how much space to include between the walls of the table.
Ans. False
- <caption> tag gives heading to a Web page.
Ans. False
- cellpadding attribute is used with <body> tag.
Ans. False
- The rowspan attribute with < table > tag is used to merge more than one cells row wise.
Ans. True
- The rowspan attribute is used to make a cell span multiple columns.
Ans. False
- The align and valign are the attributes used with <td> tag to set the alignment of data in a cell.
Ans. True
- The <td> tag (column setting) have higher priority than <tr> tag (row setting).
Ans. True
- Table row <tr> tag can accept one attribute.
Ans. False
- <th>‘tag is used to specify the column heading in a table.
Ans. True
- ROWSPAN attribute with <table > tag is used merge more than one cell row wise
Ans. True
- Align and valign are the attributes used with <TD> tag to set the alignment of data in a table.
Ans. True
- <TR> tag is used to specify the individual row in a table
Ans. True
Fill in the blanks:
- To insert a table on a Web page, we use __________ tag.
Ans. <table>
- The tag to start a table is __________
Ans. <table>
- _________ tag is used to insert data into a table.
Ans <td>
- The __________ attribute is used to display a specific portion of a table border.
Ans. frame
- frame attribute is used with _________ attribute.
Ans. border
- In the rules attribute, the ________ value helps to display a table border only between rows.
Ans. rows
- Cellspacing is used to create space between different _________ in a table.
Ans. cells
- The _________ is an attribute of the < table > tag to set the distance between the cell content and its boundary.
Ans. cellpadding
- To set image as background of an HTML table, you can use __________ attribute.
Ans. background
- By default, color of a table is __________
Ans. white
- The height and width attributes of < table > tag are specified in terms of _________ or percentage.
Ans. pixels
- <td> tag can only be present inside _________
Ans. <tr>
- The _________ attributes is used to combine the cells vertically.
Ans. rowspan
- The __________ attribute is used to span two or more columns in a table.
Ans. colspan
- The __________ attribute is used to align the data vertically within cells.
Ans. valign
- The <tr> tag can only be present inside _________tag.
Ans. table
- The <thead> tag is used to specify the _________ part of the table.
Ans. head
- _________ altribute is used to span two or more column in a table
Ans. colspan
- An _________ link allows a link to another section on the same web page
Ans. Internal
- __________ is used to combine the cells vertically .
Ans. Cellpadding
- __________ is an attribute of the <table > tag to set the minimum distance between two adjacent cells
Ans. Cellspacing
- __________ tag is used to create a table row.
Ans. TR
- The _________ tag is used to specify the individual table data in a table
Ans. <TD>
- IN HTML while creation a table, we can use HTML background altribute with __________ tag
Ans. <TR>