The standard enthalpy of formation of the most stable form of an element under standard conditions is ZERO.
O2 (g) --> O2 (g) DH = 0
1/2 N2 (g) + 3/2 H2 (g) --> NH3 (g) DHof = -46.19 kJ/mol
By definition, chemical elements in standard states at 298K and 1 atm have zero enthalpy,
 Ho = 0 for each element in its most stable form at 298K and 1 atm.
This is an arbitrary definition, just as defining sea level to be zero altitude.

Hence the standard heats of formation of elements in their most stable forms at 298K an 1 atm is ZERO.

Hence the standard enthalpy of formation of H2(g) is the reaction of H2 (g) -> H2 (g).  Which is zero

By definition the standard heat of formation is the heat accompanying the formation of a product from elements in their standard states.


Hence because of the definition of the standard heat of formation, the standard heat of formation of elements in their most stable form at standard conditions is zero.