Nitrogen is the primary gas released during farting, along with carbon dioxide which is present in higher quantities in those who consume carbonated drinks more regularly.
Other gases are methane and hydrogen (which are flammable), so a fart containing adequate amounts of these may be ignited.
(However, not all humans produce farts that contains methane.)
As we all know, the gas released during a fart frequently has an unpleasant odour which mainly results from low molecular weight fatty acids such as Butyric Acid (the rancid butter smell) and reduced sulphur compounds such as hydrogen sulphide (the rotten egg smell) and carbonyl sulphide that are the result of protein breakdown.
The major components of a fart, (which are odourless), by percentage are:
Nitrogen - 20% - 90%
Hydrogen - 0% - 50%
Carbon Dioxide - 10% - 30%
Oxygen - 0% - 10%
Methane - 0% - 10%
None of this mitigates the fact that the sound of farts are funny as heck - when you aren't too close to them...