Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6787559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:22:50+00:00 2026-05-26T17:22:50+00:00

What is the difference between document.documentElement.clientHeight and document.body.clientHeight ? Are the return values consistent

  • 0

What is the difference between document.documentElement.clientHeight and document.body.clientHeight? Are the return values consistent across all web browsers or does each evaluate them differently?

In my particular case, the documentElement seems to have a smaller height than the body element, which does not make sense. Why does this happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:22:51+00:00Added an answer on May 26, 2026 at 5:22 pm

    The document.documentElement property gives you the html element, while the document.body property gives you the body element.

    The window.innerHeight property returns the height of the window rather than the height of the content.

    Different browsers will give you different values for the size of those elements, and the same browser may give you different values depending on whether the page is rendered in Quirks Mode or Standards Compliance Mode, and whether you are using HTML or XHTML. The html element can either represent the window, or the entire page. The body element can either be the same size as the html element, or the size of the content in the page.

    The html and body elements are “magical” elements that doesn’t exist in the same way as other elements. In XHTML they were changed so that they work more like real elements, but there are still some things that are “magic”. For example, the body element doesn’t have a background on it’s own, instead the html and body share the same background, and it always covers the entire window even if the body element doesn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the difference between document.location.href and document.location ? Is it the same across
Is there any difference between using: $(document).ready(function(){ vs. $(function(){ Does one of these work
What is the difference between window.onload , document.onready and body.onload ?
Can any one explain what is the difference between document.all and the document.forms[0] please?
Is there any difference between document.onclick and window.onclick event?
Can someone tell me the difference between: $(document).ready(function() { }); and: var someVar =
What's the difference between window.location and document.location? Should both of them reference the same
What is the difference between these two functions? 1: $(document).ready(function myfunc() { function dosomething()
Whats the difference between document.getElementById() and document.ie8_getElementById().
So I came across a piece about the difference between jQuery's bind() and live()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.