LECTURE 3 questions
LECTURE 3 questions
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.
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.
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.
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.