Covalent bonding is when atoms share electrons with each other to get a full outer shell. Each covalent bond provides an extra shared electron for each atom.
Hydrogen atoms all have one electron, to fill their outer shell they share their electrons. It becomes H2.
Chlorine atoms only need one more electron so they share their electrons to fill their outer shell. It becomes Cl2.
Carbon has four outer electrons so it makes…