Use the attributes argument to createElement instead of manually setting it.