Learning path › Lesson 3

Merging cells

Goal: merge several cells into one large cell, for a title above the table or a lesson that lasts two periods.

▶ Open this example

School timetable with merged cells
A school timetable: the title spans the full width, ICT and PE last two periods, and the lunch break applies to every day.

Merging and unmerging

Note: if the cells you merge already contained text, that text ends up one line below the other in the new cell. Delete what you do not need.

Make it yourself

  1. Make a table of 6 columns and 8 rows (with AC and AR).
  2. Title: drag over the 6 cells of the top row, click MC and type Timetable 3B. Make the title bold, larger and centred, with a dark cell colour and white text (see lesson 2).
  3. Days and times: in row 2 type Time, Monday ... Friday and in the first column the start times.
  4. A double lesson: on Tuesday drag over the cells of 9:20 and 10:25, click MC and type ICT. Do the same for PE on Wednesday.
  5. Lunch break: in the 12:00 row drag over Monday to Friday, click MC and type Lunch break.
  6. Fill in the other lessons and give the header and break cells a colour.

Behind the scenes

In the HTML code (open the roll-out panel at the bottom) you can see how merging works: a cell across several columns gets colspan, a cell across several rows gets rowspan. The title, for example, has colspan="6".

Exercise

On Friday afternoon there are two periods of Project work instead of Art and Economics. Change the timetable.

Solution

On Friday drag over the cells of 13:00 and 13:50 and click MC. The old text of both cells is now one line below the other in the new cell: double-click, delete that text and type Project work. In the HTML code the cell now has rowspan="2".

Working on Linux? Then open the example yourself with Open table designer: folder lessen/en, file les03-lessenrooster.htd.