0% found this document useful (0 votes)
2 views

LECTURE 3 questions

Uploaded by

0112cs221035
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

LECTURE 3 questions

Uploaded by

0112cs221035
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

LECTURE 3 Questions

HTML rows and columns

1. **What HTML element is used to define a row in a table?**

Answer: The `<tr>` element is used to define a row in an HTML table. Each `<tr>` element contains one
or more `<td>` or `<th>` elements to represent cells within the row.

2. **How can you span a cell across multiple columns in HTML?**

Answer: You can use the `colspan` attribute within a `<td>` or `<th>` element to span a cell across
multiple columns. For example, `<td colspan="2">` would span the cell across two columns.

3. **What is the purpose of the `<th>` element in HTML tables?**

Answer: The `<th>` element is used to define header cells in an HTML table. These cells typically
contain headings for rows or columns and are displayed in bold and centered by default, distinguishing
them from regular data cells defined with the `<td>` element.

4. **How can you create a table with specific dimensions in HTML?**

Answer: You can use the `colspan` and `rowspan` attributes within the `<td>` and `<th>` elements to
create tables with specific dimensions. By spanning cells across multiple rows or columns, you can
customize the layout and structure of your table.

5. **What HTML attribute determines the order of columns in a table when using CSS for styling?**
Answer: The `order` property in CSS, when applied to table columns using flexbox or grid layout,
determines the visual order of columns. This attribute allows for flexible control over the presentation of
table data without altering the underlying HTML structure.

You might also like