PSEB Punjab Board Class 10 Computer Science Textbook Solution Chapter 3 HTML Part – II Exercise Questions and Answers
Q1) Multiple Choice Questions :-
1) Which of the following list is not used in HTML document
a) Bulleted List b) Numbered List c) Ordered List d) Data List
2) Which of the following tag is used to define the list items in the ordered and unordered lists?
a) <OL> b) <UL> c) <LI> d) <DT>
3) tag is used to create a table row in the HTML document
a) <row> b) <table row> c) <TR> d) <R>
4) By using attribute, we can adjust space between table cells.
a) Cell-spacing b) cell-padding c) rowspan d) colspan
5) We will use attribute if we want to merge cells of two or more rows into a single cell.
a) Cellspacing b) cellpadding c) rowspan d) colspan
Q2) Write the full forms of the following :-
1) <OL> : Ordered List
2) <UL> : Unordered List
3) <DL> : Definition List
4) <LI> : List Item
5) <DL> : Definition List
6) <DT> : Definition Title/Data Term
7) <DD> : Definition Description/Data Definition
8) <TR> : Table Row
9) <TH> : Table Heading
10) <TD> : Table Data
Q3) Fill in the blanks :-
1) In HTML documents, we can create and use three different types of lists
2) In Unordered list, all the list items are marked with bullets.
3) A Nested list is a list within a list
4) <TH> tag is used to define the Table Headings.
5) We can set the vertical alignment of only cell contents using valign attribute.
Q4) Short Answer Type Questions :-
1) What is Definition List
Ans :- The another name of Definition List is Description List. It is the type of a list in which list of items are been displayed along with its description or definition. <dl> tag is made used to specify definition list in HTML document. In the definition list, there are the items list which has two entries which are
a) Definition Title :- This entry is also recognized with the other name as Data Term. The specify the definition list in HTML document, <dt> tag is made use.
b) Definition Description :- This entry is also known by the name Data Definition. The <dd> tag is made used in HTML document to describe the entry definition description.
2) What is Ordered List? Write the name of tag and attributes for creating ordered lists
Ans :- The ordered list is used to display the list of items in the number form, and hence it is known as Numbered list. OL is the short abbreviation for Ordered List. The
<ol> tag is made used to describe the ordered list. This tag comes/or used in pair <ol> and </ol> tag. The attributes for creating ordered lists are Type and Smart.
3) Write the names of various basic tags used for creating tables in HTML
Ans :- <TABLE>, <TR>, <TH>, <TD>, <CAPTION> are the tags which are used for creating tables in HTML.
4) How will you merge cells of HTML table
Ans :- For merging the cells in HTML table, we make use of two attributes i.e is Colspan and Rowspan.
a) Colspan :- This attribute in HTML table is useful in combining the cells of two or more columns into the single cell.
b) Rowspan :- This attribute is used in HTML table for combining the cells of two or more rows into the single cell.
5) Explain the various attributes of <table> tag used for formatting its background.
Ans :- The attributes of the <table> tag ware used for formatting in background are as follows :-
a) Bgcolor :- This attribute is mostly useful in changing the background color of the entire table. With the help of this attribute one can easily change the color of the cell or row the table in HTML document. In this attribute, the property of the color can be defined by color name or hexadecimal color code. For ex:-
b) Background :- This attribute is mostly used for setting/adjusting the background image for the table or just for one cell. The property will be the location of the file where it is been stored and the file extension. For ex:- <table background=”back.jpg”>……</table>
Q5) Long Answer Type Questions :-
1) What are tables? Explain the basic tags used for creating a table in the HTML document?
Ans :- A table is nothing but it is the method/way in which the data /text is been represented in the form of rows and columns. The data that is arranged in the tabular form are mostly useful in analyzing the data and for research work. Tables makes easier for the user to read and understand table contents. It is the very proper method of arranging very lengthy data or information. Most of the web browsers supports the tables. In table, the user can represent the data in the form of images, texts, links etc.
The intersection of rows and columns specially called as cells in which the table contents are displayed. The building blocks of the HTML table are <TABLE>, <TR>, <TH>, and <TD> tags are :-
a) <TABLE> :- This tag will define the table itself which means it will define the rows and columns of the table. It is a paired tag, i.e means every table must start with the <TABLE> and end with </TABLE>.
b) <TR> :- The abbreviation of TR is Table row which is used to define the row in the table. This tag is paired and container tags. To define the Heading or Table data in the the row in the table, one must start with <TR> and end </TR>. In the table, if you want to add the row, the you may make use of the <tr> </tr> in the <table>tag.
c) <TH> :- To define the heading in the table. It is also a paired or container tags which consists of starts with <th> and ends with </th> tag. While defining the table heading row one must use combination of separate <th> …..</th> tags. Generally the table heading is applied in the top row but if incase we want to apply it in any other row then we can do it by making use of <th> tag in that particular row. In the table cell, the headings are bold and centered which is by default.
d) <TD> :- This tag will define the data and cell contents of the table. TD stands for Table Data. This tag is also paired or container tags which starts with <td> and ends with </td>. This tag must be defined within the <tr> tag. The contents which are defined by the <td> tag are left aligned i.e is by default.
e) <CAPTION> :- We can define the Title or Explanation to the table by using this <caption> tag. This tag is aligned to center and is shown at the table’s top. It is necessary to make use of this <caption> tag just after the <table> tag. This tag is only meant for applying/giving title to the table, or otherwise no need of using it.
2) What is Cell Padding and Cell Spacing? Explain with suitable example
Ans :- In the cells of table, there is a empty space left over, so the two attributes like Cell Padding and Cell Spacing performs the task of adjusting this empty spaces. This attributes are defined in the table tags.
a) Cell padding :- It is used to format the cells of the table look good by providing the space within the cells. It defines the space/distance between the contents of the table and the cell border in the table. 1 pixel is the by default cell padding. For ex:- <table cellpadding=”5”>
b) Cell Spacing :- This another type of attribute in the <table> tag. It is used to define the space between the cells. It provides space outside the border of the cells in the table. By default 2 pixel is cell spacing. For ex:- <table cell spacing “7”>. Below you may find the figure showing the Cell padding and Cell spacing.
3) Differentiate between Ordered List and Unordered List.
Ans :- The difference between the Ordered List and Unordered List are as followed : –
a) Ordered List :- If you want to show the items in a particular order, or set of instructions and a table of contents, sequentially, which makes your page look attractive then you may make use of ordered list or numbered list. This tag can be appeared/ used in both the pairs that is opening <OL> and closing tags </OL>. You have to add <OL> tag in front of the list and </OL> at the end of the list. In the HTML document, the list of items are defined by using <li> tag. In this type of list, items list order matters.
b) Unordered List :- This list does not have anything to do with the orders of the items in the list. This list displays the items in the form of bullets, hence that is why unordered list is called as bulleted list. Here the UL full form is Unordered List and <ul> tag is used to make such type of lists. Like wise the ordered list this list is also has paired tags i.e is the list items should be always placed in between the <ul> and </ul> tag. LI stands for List items and to define the list items the document <li> is used.
Dear Student, I appreciate your efforts and hard work that you all had put in. Thank you for being concerned with us and I wish you for your continued success.
For more update, follow this page ⇒ PSEB Notes and Solutions