jQuery html() method example

In this post,  we are going to see jQuery html method.

html method is used to get html content of first matched elements,  other elements will be ignored and html(‘new html content’) is used to set html content for all matched elements.
Syntax for html() :
Syntax for html(‘new html content’) :
Let’s understand with the help of example:

Live demo:Jquery html method example on jsbin.com

Add Comment