Tag Archives: jQuery html method example

jQuery html method


jQuery html method : is used to get the html of the given element.


Syntax of jQuery html() method

Get Html

$(selector).html();

Note : It does not accepts any argument.

jQuery html Method Example 1

jQuery html() Method – Example 1 – Get The Html


Try it »

Set Html

$(selector).html(html-data);

html-data: string containing the html.

jQuery html() method Example 2

jQuery html Method – Example 2 – Set The Html/h3>


Try it »