Question answer of chapter – 8(Web Development : lists and tables.
Tick the correct option.
1. Which one of the following is a bulleted list?
Ans - Unordered list
2. ______ Tag is used to set the start and end of a definition list
Ans - <DL>
3. Which of the following tags are used to set the rows and columns of a table?
Ans - <TR> <TD>
4. ______ tag is used to give a name to the table.
Ans - <CAPTION>
5. Which of the following represents the distance between cell borders and content within a
cell?
Ans - cellpadding
B. Fill in the blanks:
1. The default value applied by the browser is Disc in unordered lists.
2. <DD> is used to define and describe terms, much like a dictionary.
3. <TD> tag is used to create data cells.
4. A table consists of horizontal Rows and vertical Columns that intersect to form a cell.
5. <TR> tag is used to add rows to tables.
C. Write T for True and F for False:
1. <ol> tag is used to define an orderly list — T
2. Tables are used to organise data in row and column — T
3. Disc is the default bullet type in the orderly list — F
4. An unorderly list is a list of items marked with bullets — T
5. Cellpadding property is used to adjust the space around a cell — T
D . Answer the following.
1. Define list in HTML. What are the different forms of list used in HTML?
A list in HTML is used to display a group of related items in an organized manner. The different
forms of lists used in HTML are:
* Ordered List (`<ol>`) – displays items in a numbered or ordered form
* Unordered List (`<ul>`) – displays items with bullets
* Definition List (`<dl>`) – displays terms and their definitions
2. What is a table? What are the basic tags used for creating a table?
A table in HTML is used to arrange data in rows and columns for better presentation and
understanding. Basic tags used for creating a table are:
<table> – defines the table
<tr> – defines a table row
<td> – defines a table data (cell)
<th> – defines a table heading
<caption> – gives a title to the table
3. What is the difference between ordered list and unordered list?
Ordered List Unordered List
Uses `<ol>` tag Uses `<ul>` tag
Items are numbered Items are marked with bullets
Order of items is important Order of items is not important
Uses numbers, letters, Roman numerals Uses disc, circle, or square bullets
4. Explain the properties of `<TABLE>` tag
Some important properties (attributes) of the `<table>` tag are:
border – sets the border thickness of the table
cellpadding – sets space between the cell content and cell border
cellspacing – sets space between cells
width / height – sets the size of the table
align – aligns the table (left, center, right)
5. What is a definition list? Explain briefly with an example
A definition list is used to display terms and their meanings, similar to a dictionary.
<dl> – defines the definition list
<dt> – defines the term
<dd> – defines the description
E. Application based questions
1. Kishore wants to add a recipe to his website but forgot how to display items using capital
numerals. Guide him. To display list items using capital numerals (I, II, III) in HTML
Ans : To display list items using capital numerals (I, II, III) in HTML, Kishore should use an
Ordered List with the correct type attribute.
Steps: 1. Use the <ol> tag to create an ordered list.
2. Set the attribute `type="I"` to display capital Roman numerals.
3. Add each item using the `<li>` tag.
2. Arman is preparing a timetable on his website but forgot how to combine cells. Guide him.
To combine cells in an HTML table.
Ans: Arman should use the colspan and rowspan attributes.
Properties used: colspan → Combines cells horizontally (columns)
rowspan → Combines cells vertically (rows)
Steps to combine columns:
1. Use the <td> or <th> tag.
2. Add the colspan attribute with the number of columns to be merged.
F. Competency based questions.
1. Step-by-step guide to add a Definition List to a web page
A definition list is used to display terms along with their meanings.
Steps:
1. Start with the basic HTML structure using `<html>`, `<head>`, and `<body>`.
2. Use the `<dl>` tag to create a definition list.
3. Use the `<dt>` tag to define the **term**.
4. Use the `<dd>` tag to write the **definition or description**.
5. Save the file with a `.html` extension and open it in a web browser.
2. Creating a list within a list (Nested List) – Explanation with example
A nested list means placing one list inside another list item. It is useful when information has
main points and sub-points.
Steps
1. Create a main list using <ul> or <ol>.
2. Inside an `<li>` tag, add another <ul> or <ol>.
3. Add list items to the inner list.
4. Save and view the page in a browser.
Example:
<html>
<body>
<ul>
<li>Fruits
</ul>
<li>Apple</li>
<li>Banana</li>
<li>Mango</li> </ul>