Hydrocarbon is a compound containing only the elements hydrogen and carbon. May exist as a solid, a liquid or a gas. The term is mainly used in a catch-all sense for oil, gas and condensate.