You can set up an electrolysis experiment in the lab like the set-up in the picture. Once the experiment is finished you can test any gaseous products to work out what was produced:
Chlorine bleaches damp litmus paper, turning it white
Hydrogen makes a ''squeaky pop'' with a lighted splint