GATE 2009
66 questions
MCQ 661-mark 24 · 2-mark 42
Questions 66–66 of 66
Consider the HTML table definition given below:
< table border=1 >
< tr > < td rowspan=2 > ab < /td >
< td colspan=2 > cd < /td >
< /tr >
< tr > < td > ef < /td >
< td rowspan=2 > gh < /td >
< /tr >
< tr > < td colspan=2 > ik < /td >
< /tr >
< /table > The number of rows in each column and the number of columns in each row are:Answer: (C)
Place each cell on a grid. Row 1 has ab (rowspan=2, so it also fills row 2) and cd (colspan=2, so it fills columns 2 and 3). Row 2 has ef in column 2 (column 1 is taken by ab) and gh in column 3 (rowspan=2, so it also fills row 3). Row 3 has ik (colspan=2), which fills columns 1 and 2 because column 3 is taken by gh.
Count the cells in each column (a spanning cell counts once):
Column 1: ab, ik = 2. Column 2: cd, ef, ik = 3. Column 3: cd, gh = 2. So 2, 3, 2.
Count the cells in each row:
Row 1: ab, cd = 2. Row 2: ab, ef, gh = 3. Row 3: ik, gh = 2. So 2, 3, 2.
Answer: (C)
| ab | cd | |
| (ab) | ef | gh |
| ik | (gh) | |
Count the cells in each column (a spanning cell counts once):
Column 1: ab, ik = 2. Column 2: cd, ef, ik = 3. Column 3: cd, gh = 2. So 2, 3, 2.
Count the cells in each row:
Row 1: ab, cd = 2. Row 2: ab, ef, gh = 3. Row 3: ik, gh = 2. So 2, 3, 2.
Answer: (C)