Hydrogen being a highly inflammable gas and oxygen being a supporter of combustion, yet water which is a compound made up of hydrogen and oxygen is used to extinguish fire. Why ?
H2O is a compound formed by element H and O. All 3(H, O, H2O) have different chemical entity and hence have different chemical properties. On the basis of chemical property of individual entity it is used. H2 is flammable. O2 is combustible and H2O is used in fire-extinguisher.