w3schools font family javascript code example Example: change font js selector.style.fontFamily = "Times New Roman";