

Hydrocarbons are compounds mainly consisting of hydrogen and carbon. Both hydrogen and carbon have very similar electronegativities, as a result of which the covalent shared pair of electrons between hydrogen and carbon are equally shared between both these atoms. Due to this, there is no dipole moment in the substance. So, the van der waals forces which arises due to dipole moments is negligible. Therefore, small hydrocarbons mainly occur as gases. Example, methane, ethane, etc.
However, larger hydrocarbons can interact with other molecules and also with N, O etc. if they are present in the molecules. In this way they are more tightly held by intermolecular forces, including dipole intractions and van der waals forces. Thus they exist ans liquids or solids. Example, hexane, benzene are liquds, paraffin wax, naphthalene are solids.
