# jQuery HTML / CSS Methods

« Previous
Next Chapter »

## jQuery HTML / CSS Methods

The following table lists all the methods used to manipulate the HTML and CSS.

The methods below work for both HTML and XML documents. Exception: the html() method.

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
attr() | Sets or returns attributes/values of selected elements
before() | Inserts content before selected elements
clone() | Makes a copy of selected elements
css() | Sets or returns one or more style properties for selected elements
detach() | Removes selected elements (keeps data and events)
empty() | Removes all child nodes and content from selected elements
hasClass() | Checks if any of the selected elements have a specified class name
height() | Sets or returns the height of selected elements
html() | Sets or returns the content of selected elements
innerHeight() | Returns the height of an element (includes padding, but not border)
innerWidth() | Returns the width of an element (includes padding, but not border)
insertAfter() | Inserts HTML elements after selected elements
insertBefore() | Inserts HTML elements before selected elements
offset() | Sets or returns the offset coordinates for selected elements (relative to the document)
offsetParent() | Returns the first positioned parent element
outerHeight() | Returns the height of an element (includes padding and border)
outerWidth() | Returns the width of an element (includes padding and border)
position() | Returns the position (relative to the parent element) of an element
prepend() | Inserts content at the beginning of selected elements
prependTo() | Inserts HTML elements at the beginning of selected elements
prop() | Sets or returns properties/values 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
scrollLeft() | Sets or returns the horizontal scrollbar position of selected elements
scrollTop() | Sets or returns the vertical scrollbar position of selected elements
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)
width() | Sets or returns the width of selected 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

« Previous
Next Chapter »

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples