Reference for jQuery HTML Methods
This latest and complete reference guide presents a full list of jQuery HTML methods used to manipulate HTML content and structure dynamically. These methods let you add, remove, update, or retrieve HTML DOM elements, attributes, and content, making it easier to create dynamic and interactive web pages.
Alphabetical HTML Methods Reference
Below is the full list of jQuery methods used to handle HTML structure and content, organized alphabetically.
Method | Description |
addClass() | Adds one or more class names to selected elements |
after() | Inserts content after selected elements |
append() | Inserts content at the end of selected elements |
appendTo() | Inserts HTML elements at the end of selected elements |
before() | Inserts content before selected elements |
clone() | Makes a copy of selected elements |
detach() | Removes selected elements (keeps data and events) |
empty() | Removes all child nodes and content from selected elements |
html() | Sets or returns the content of selected elements |
insertAfter() | Inserts HTML elements after selected elements |
insertBefore() | Inserts HTML elements before selected elements |
prepend() | Inserts content at the beginning of selected elements |
prependTo() | Inserts HTML elements at the beginning of selected elements |
remove() | Removes the selected elements (including data and events) |
removeAttr() | Removes one or more attributes from selected elements |
removeClass() | Removes one or more classes from selected elements |
removeProp() | Removes a property set by the prop() method |
replaceAll() | Replaces selected elements with new HTML elements |
replaceWith() | Replaces selected elements with new content |
text() | Sets or returns the text content of selected elements |
toggleClass() | Toggles between adding/removing one or more classes from selected elements |
unwrap() | Removes the parent element of the selected elements |
val() | Sets or returns the value attribute of the selected elements (for form elements) |
wrap() | Wraps HTML element(s) around each selected element |
wrapAll() | Wraps HTML element(s) around all selected elements |
wrapInner() | Wraps HTML element(s) around the content of each selected element |