Question:

Anish wants to merge three cells of a single row in an HTML table. Which attribute should he use?

Show Hint

Cells in one row are side by side, so they are in different columns. Which span joins columns?
Updated On: Nov 3, 2026
  • rowspan
  • colspan
  • width
  • align
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding the Question:
Three cells of one row are side by side, which means they sit in three columns. Merging them means one cell must stretch across three columns.

Step 2: Key Concept:
The colspan attribute makes a cell cover more than one column. Example: <td colspan="3"> makes one cell as wide as three cells.

Step 3: Check option A (rowspan):
rowspan merges cells vertically, across rows. Here the cells are in the same row, so A is FALSE.

Step 4: Check option B (colspan):
colspan merges cells horizontally, across columns. This is what Anish needs. So B is TRUE.

Step 5: Check option C (width):
width only changes the size of a cell. It does not merge any cells. So C is FALSE.

Step 6: Check option D (align):
align only places the content to the left, centre or right. It does not merge cells. So D is FALSE.

Final Answer:
Merging cells of one row across columns needs colspan, so the correct option is B. \[ \boxed{\text{B. colspan}} \]
Was this answer helpful?
0
0

Top CBSE X Questions

View More Questions