Are halogens the basis of all fossil fuels?
Halogens are not the basis of all fossil fuels. Carbon is the basis of fossil fuels and it is not a halogen.
They don't have to be. Some fuels are fossil fuels, which are rapidly disappearing right now. Some examples of fossil fuels are oil, which we use for gas, and coal, which we use for heat and electricity. But fossil fuels take millions of years to make more, so we are rapidly using up the fossil fuels of the world.