Skip to content
Related Articles

Related Articles

jQuery | outerHeight() Method

View Discussion
Improve Article
Save Article
  • Last Updated : 17 Dec, 2020
View Discussion
Improve Article
Save Article

The outerHeight() method in jQuery is used to find the outer height of the specified element. Outer height of an element includes padding and border.



Parameters: This method accepts single parameter includeMargin which is optional. It contains boolean value and used to specify whether the margin to be included or not. If includeMargin is set to true then margin included otherwise margin not included. By default the includeMargin set to false.

Below example illustrates the outerWidth() method in jQuery:

Example: This example display the outer height of an element.

<!DOCTYPE html>
    <script src=
    <!-- Script to return outer height -->
        $(document).ready(function() {
            $("button").click(function() {
                alert("Outer height of div: "
                    + $("div").outerHeight());
    <!-- Style to create box using padding
            and margin -->
        .geeks {
            height: 80px;
            width: 200px;
            padding: 5px;
            margin: 5px;
            border: 2px solid black;
            background-color: green;
            text-align: center;
    <div class="geeks">
    <button>Click Here to display outer height</button>

Before Click on the button:

After Click on the button:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!