JavaScript – Change Text in Div to Bold
To change text in Div to bold using JavaScript, get reference to the div element, and assign element.style.fontWeight
property with value of "bold"
.
Example
Conclusion
In this JavaScript Tutorial, we learned how to change text in a div to bold using JavaScript.