So if you remember, ionic bonding only occurs when your compound contains both metals and non-metals, e.g. sodium chloride, lithium sulfide, sodium hydroxide, etc.
If you have a substance (element or compound) which contains ONLY non-metal elements, then electrons are not lost or gained for the atoms to achieve a full outer shell - instead they are shared!
SHARING IS CARING!
Let's look at some examples of what we mean by this.....
Example 1 - hydrogen
Let's say that the red dot is the one electron which belonged to the hydrogen atom on the left. The blue cross is the one electron which originally belonged to the hydrogen atom on the right. The overlap between the two atoms now shows that this "pair of electrons" is being shared by both the atoms. So each of the hydrogen atoms now "sees" two electrons (a full outer shell!). Remember, the first shell only needs to have two electrons to be full.....
The sharing must be equal, as sharing is caring! So the atom on the left shares one to the atom on the right, but this means it must have one shared back.
This is why a molecule of hydrogen has the formula H2
One shared pair of electrons is called a "single covalent bond"
Example 2 - oxygen
Atoms of oxygen are in Group VI, so this means they have six electrons in their outer shell. So let's think how this works.....
One atom of oxygen needs to share two from another atom of oxygen, then it will see a full outer shell of eight..... but because sharing is caring, it must also share two electrons back to the other oxygen atom.
You can see that there are now four electrons being shared in total, which both of the atoms "see". The red dots on the left are the six electrons which originally belonged to the oxygen atom on the left and the blue crosses are the six electrons which originally belonged to the oxygen atom on the right.
Each oxygen atom is only sharing two of its original six... the other four are only "seen" by the original atom and are not in the shared overlap region.
Two shared pairs of electrons is called a "double covalent bond"
Example 3 - water
When you do more complicated dot and cross diagrams for covalent substances, the atom you have fewer of usually goes in the middle. Water is a good example, as you know its formula without even thinking about it! So what does a water molecule's dot and cross diagram look like then.....?
Example 4 - methane