Set Content and Attributes in jQuery
Text(), html(), and val() are methods for setting content ()
To create content, we'll use the same three methods as on the previous page:
Sets or returns the text content of selected elements with text().
html() - Sets or retrieves the content of a set of elements (alongside HTML markup)
val() is a function that defines or gives an output of required fields.
Using the jQuery text(), html(), and val() methods, the following example shows how to set content: