js function to create HTML tag