codeGK
Code it ALL
jQuery set html() - CodeGK

♦ jQuery set html()

♣ Example1: jQuery set html()

Sets the HTML content of selected HTML element, i.e, the input will have tags along with text.
Basic Syntax
$(selector).html(html_data);
selector: the HTML element to be selected
html(): syntax for assigning text with html tags.
html_data: content, including HTML tags.
In this example, jQuery set html() method is illustrated.
Example
Input:
Output: