Hydrocarbons A hydrocarbon is a compound containing the elements H and C only.A hydrocarbon is a compound containing the elements H and C only. A Homologous.