NCERT Solutions for Class 10th: Ch 3 Tables Computer Science
ExcerciseA. Multiple choice questions
1. <TR> belongs to Frameset tag.
(a) <Table>
(b) <DIV>
(c) <Frameset>
(d) <TD>
► <Table>
2. ______ tag is used to add columns to a table
(a) definition list
(b) definition list term
(c) definition list description
(d) none of the above
► (d) none of the above
3. Which attribute is used to define cell contents to left?
(a) VAlign
(b) Align
(c) GAlign
(d) HAlign
► (b) Align
4. Tag to add a row to a table.
(a) TR
(b) TD
(c)TH
(d) TC
► (a) TR
5. Which of the following is used to specify the beginning of a table’s row?
(a) TROW
(b) TABLER
(c) TR
(d)ROW
► (c) TR
6. In order to add border to a table, BORDER tag is specified in which tag
(a) THEAD
(b) TBORDER
(c) TABLE
(d) TR
► (c) TABLE
7. Which of these tags are called table tags?
(a) <Thead><body><tr>
(b) <Table><tr><td>
(c) <Table><head><tfoot>
(d) <Table><tr><tt>
► (b) <Table><tr><td>
8. ___________ tag is used to define the heading of a table
(a) TABLE
(b) COLUMN
(c) HEADING
(d) TITLE
► (c) HEADING
9. Which HTML command is used to align the contents of the cell to right.
(a) <TR align= right->
(b) <TD align = right>
(c) <TD> align =right
(d) All of the above
► (a) <TR align= right->
B. Answer the following questions:
1. What attribute will be used on the CAPTION tag to put the table description at the bottom of the table?
Answer
ALIGN=BOTTOM attribute will be used on the CAPTION tag to put the table description at the bottom of the table.
2. Write the code to display a ‘ghost cell’.
Answer
<TABLE border=1>
<TR>
<TD> Col1Row1</TD>
<TD>Col2Row1 </TD>
</TR>
<TR>
<TD>Col1Row2</TD>
</TR>
</TABLE>
3. Name the tag that defines how to divide the window into frames.
Answer
<FRAMESET> tag defines how to divide the window into frames.
4. Name the tag that is used to put HTML document into frames.
Answer
<iframe> tag is used to put HTML document into frames.
5. Where the text is displayed which is specified in the <caption> tag?
Answer
The text is displayed which is specified in the <caption> tag is displayed at center with respect to the table.
6. Which attribute will you use if you do not want frame windows to be resizable?
Answer
noresize attribute is used if we do not want frame windows to be resizable.
7. Differentiate between <TH> and <Caption> tags.
Answer
The TH tag encloses the Header object and makes the data boldface and center aligned while <caption> tag is used to provide a text to the table so as to explain the contents of the table. It is generally in bold, at center with respect to the table.
8. How <TD> and <TR> are different from each other?
Answer
TR tag is used to define rows in a table. Table rows are divided into table data with the <td> tag. The TD keeps the data in regular font and left aligned by default.
9. What is the purpose of using Frames in HTML pages?
Answer
A frame divides the screen into separate windows with both vertical and horizontal scroll bars. Frames are needed when you want to have menus on one side and the contents or the operations on the other side. When the user clicks on one of the menu items, the contents become visible on the other side. A frame divides the webpage into different windows. It makes some structural changes
to the main window.
10. Discuss all the tags with their attributes to create a frame.
Answer
The attributes used with the <FRAMESET> element:
1.Rows: It accepts Number in percentage or star (*) indicating the rest of the window. It divides the main window horizontally in proportion to main window.
2. Cols: It accepts Number in percentage or star (*) indicating the rest of the window. It divides the main window vertically in proportion to main window.3. Frame border: It accepts value in number. It is used with netscape navigator to surround the sub-window with a border. If value is set to zero, no outer lines appear around the frame.
4. Frame spacing: It accepts value in number. If set to zero, it removes the ugly grey lines appearing between the two frames, otherwise it increases the width of the grey line.
The FRAMESET element works in conjunction with the FRAME tag whose attributes are1. src: It is necessary attribute which describes Address of the HTML document.
2. scrolling: It accepts value in yes/Auto/No.
3. Noresize: It is used if we do not want frame windows to be resizable.
4. Name: Assign a name to the frame.
5. Target: This attribute specifies the name of a frame where a document is to be opened.
11. What does ‘n’ stands for in the following tags?
(a) <Table border=n> : Here n is any numerical value 1,2,3 etc. which specifies table border boldness.
(b) <table bgcolor= “n”> : Here n stands for any color name/hex color code/rgb code which provide background color to table.
(c) <td bgcolor =“n”> : Here n stands for any color name/hex color code/rgb code which provide background color to cell.
(d) <tdwidth=n> : Here n is any numerical value 1,2,3 etc. which specifies table cell width.
(e) <a href=“n”> : Here stands for any URL.
12. Which code snippet will display the following? Explain why
Option B is correct because it uses   entity to create a space while in Option space is a ghost cell.
Go To Chapters