how to change text font in html using javascript code example Example: change font js selector.style.fontFamily = "Times New Roman";