The enthalpies of elements in their standard states are taken as zero. The enthalpy of formation of a compound
Example:
Now, from the above example it is clear that enthalpy of a formation of compound can be positive or negative.