The properties of hydrogen and helium under extreme conditions