Step-by-step explanation:
A molecule which have two atoms attached to it is known as a diatomic element.
For example,
is a diatomic molecule because it has two nitrogen atoms attached to it.
HCl is also a diatomic molecule and the bond between this molecule is formed by sharing of electrons. Thus, it as a covalent bond. Also, chlorine is more electronegative than hydrogen atom. So, Chlorine will attract an electron from hydrogen more towards itself in order to complete its octet.
Thus, there will be formation of partial negative charge on chlorine and partial positive charge on hydrogen atom. Therefore, HCl molecule is polar in nature.
Hence, we can conclude that the degree of polarity of diatomic molecules is directly related to the difference in electronegativity.