French President Emanuel Macron was able to hold off a challenge from far-right nationalist Marine Le Pen.