A printer includes a cleaning mechanism that reliably performs an operation of cleaning a liquid ejecting head with a small amount of driving energy. The cleaning mechanism includes a cap manufactured by coinjection molding of a core part and an elastic part. The cap includes a bottom surface, an outer wall, and a partition wall dividing a cap inner space surrounded by the outer wall into two. A ratio of the elastic part in the partition wall is higher than that in the outer wall. With this structure, the partition wall is more elastically deformable than the outer wall. When the cap comes into contact with a nozzle surface of a recording head and covers nozzle rows, the outer wall comes into contact with the nozzle surface with a larger stress compared with the partition wall, and seals chambers where the nozzle rows on the nozzle surface are exposed.