jQuery Tutorial

jQuery height() Method With Syntax and Example

What is height method in jQuery?

The height() method sets or returns the size of the elements that have been selected.

This method sets the height of ALL matched elements when used to select the size.

Padding, border, or margin is not included. 

height method in jQuery

Syntax of height method in jQuery

  • Return the height:


  • Set the height:


  • Set the height using a function:


Did you find this article helpful?