Hydrogen is a nonmetal that can easily react with a lot of elements and it also can form covalent bonds with a lot of elements. The reaction with various elements can be given as follows:Reaction of hydrogen with active metals:Hydrogen which has a single electron tends to accept electrons from ionic hydrides that are present like LiH which provides hydrogen with a -1 charge that makes hydrogen behave as a halogen.Reaction of hydrogen with nonmetals:Unlike the metals that form ionic bonds with nonmetals hydrogen will be much less electropositive than the active metals and hence forms covalent bonds.