Definition and Usage. The html() method sets or returns the content (innerHTML) of the selected elements. When this method is used to return content, it returns the content of the FIRST matched element. When this method is used to set content, it overwrites the content of ALL matched elements. Tip: To set or return only the text content of the selected elements, use the text() method.