How to make first word bold of all elements using jQuery ?
In this article, we will make first word bold of all elements using jquery. To make the first word bold, we use html(), and text() methods.
html() Method: The html() method in jQuery is used to set or return the innerHTML content of the selected element.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Syntax: It sets the content of matched element.
text() Method: This method is used to set or return the text content of the element. While setting the content, it overwrites the content of all the matched elements. The returned content of text method() is used to return the text content of all matched elements.
Syntax: It sets the text content.