The main components of coal are carbon, hydrogen, oxygen, nitrogen, and sulfur. The relative amounts of these elements vary depending on the rank of the coal. Coal is classified into four main ranks: anthracite, bituminous, sub-bituminous, and lignite. Anthracite is the highest-rank coal and has the highest carbon content and the lowest moisture content. Lignite is the lowest-rank coal and has the lowest carbon content and the highest moisture content.