<Tr> <Th> Secondary </Th> <Td> <Ul> <Li> hydrogen </Li> <Li> sulfur </Li> <Li> oxygen </Li> <Li> nitrogen </Li> </Ul> </Td> </Tr> <Ul> <Li> hydrogen </Li> <Li> sulfur </Li> <Li> oxygen </Li> <Li> nitrogen </Li> </Ul> <P> Coal is a combustible black or brownish - black sedimentary rock usually occurring in rock strata in layers or veins called coal beds or coal seams . The harder forms, such as anthracite coal, can be regarded as metamorphic rock because of later exposure to elevated temperature and pressure . Coal is composed primarily of carbon, along with variable quantities of other elements, chiefly hydrogen, sulfur, oxygen, and nitrogen . Coal is a fossil fuel that forms when dead plant matter is converted into peat, which in turn is converted into lignite, then sub-bituminous coal, after that bituminous coal, and lastly anthracite . This involves biological and geological processes . The geological processes take place over millions of years . </P> <P> Throughout human history, coal has been used as an energy resource, primarily burned for the production of electricity and heat, and is also used for industrial purposes, such as refining metals . Coal is the largest source of energy for the generation of electricity worldwide, as well as one of the largest worldwide anthropogenic sources of carbon dioxide releases . The extraction of coal, its use in energy production and its byproducts are all associated with environmental and health effects including climate change . Therefore as part of the worldwide energy transition many countries have transitioned away from coal . </P>

Where is coal found and how is it formed
find me the text answering this question