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

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.