Solar energy is the direct source of energy. It is a renewable source of energy. Solar energy is available free of cost to all in unlimited amount.
Coal and petroleum are fossil fuels. They are obtained from deep under Earth's crust.
Compare and contrast fossil fuels and the Sun as direct sources of energy.