Chapter 6
Chapter 6
CHApTer-6
Q1 – What are the types of list elements? Write down their syntaxes.
Ans – Numbered List (Ordered List) Displays items in a sequentially numbered order.
1. First item
2. Second item
3. Third item
Bulleted List (Unordered List) Displays items with bullet points instead of numbers.
- First item
- Second item
- Third item
Q2 – Give an example of how can you add an image in an HTML web page.
Ans - <img src="image.jpg" alt="Description of the image" width="500" height="300">
src="image.jpg": Specifies the path to the image file.
alt="Description of the image": Provides alternative text if the image cannot be
displayed.
width and height: Set the dimensions of the image in pixels.
VALIGN Attribute
Use: Specifies the vertical alignment of content within table cells or other elements.
Values are top, bottom and middle.
Q4 – How can you create a table in an HTML document using the various attributes
available?
Ans - <table>: Creates the table.
<caption>: Adds a title.
<thead>: Groups header rows.
<tbody>: Groups body rows.
<tr>: Defines a row.
<th>: Defines a header cell.
<td>: Defines a data cell.