create a class about font-size for your message and use className or classList , not just set the style here.