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 6902665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:49:35+00:00 2026-05-27T07:49:35+00:00

document.documentElement is a DOM1 property and so was specified more than 13 years ago.

  • 0

document.documentElement is a DOM1 property and so was specified more than 13 years ago. In my experiments, it’s reliable in IE6 onward and in vaguely recent versions (I haven’t gone back far) of Firefox, Chrome, Safari, Mobile Safari, Opera, and Konqueror when I use the HTML5 doctype. So that covers a fair range of layout engines: Trident, Gecko, WebKit, Presto, and KHTML.

(It even works if I omit the actual html tag in my markup [which I’m allowed to do in HTML5 — and apparently even IE6 adds it in for me despite it never having heard of HTML5 — but almost certainly never will in practice].)

Is there any significant browser — Blackberry? Android? — in which I cannot assume document.documentElement will be present and will refer to the root html element in an HTML document?

  • 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-27T07:49:36+00:00Added an answer on May 27, 2026 at 7:49 am

    Depends on your requirements. Older versions of Blackberry’s Browser, before version 6 of the OS, may not have had support for it. But the browser was so bad that any JavaScript enabled site hardly worked anyway.

    According to Wikipedia, all major rending engines support it. It seems like that table is using the IE version rather than the actual version of Trident. Trident (IE), Gecko (Firefox), Webkit (Safari, Chrome), and Presto (Opera) all support it. The Tasman rendering engine is largely obsolete and unused. I wouldn’t worry about it.

    In my personal experience, I’ve had no problems from myself or customers using that property on a reasonably modern browser.

    All mobile browsers, Safari/iOS, Android, even Internet Explorer on Windows Phone 7 support it. Recent BlackBerries do as well.

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

Sidebar

Related Questions

var fmt = document.documentElement.clientWidth; var cls = (fmt<=240)?'pda_ver':(fmt>240&&fmt<=320)?'pda_hor':(fmt>320&&fmt<=640)?'screen_ultralow':(fmt>640&&fmt<=800)?'screen_low':(fmt>800&&fmt<=1024)?'screen_med':(fmt>1024&&fmt<=1280)?'screen_high':'screen_wide'; can someone tell me what this
What is the difference between document.documentElement.clientHeight and document.body.clientHeight ? Are the return values consistent
I've heard it's offset.width , document.documentElement.clientWidth, and window.innerWidth I'm curious for projects which I
I have 2 set of code The following works on firefox x=e.clientX + document.documentElement.scrollLeft;
I was wondering if there is an alternative to using the Javascript: document.documentElement.outerHTML that
My html has an extension which embeded by other application: document.documentElement.appendChild((function () { var
I have 3 questions related to viewport; Do document.documentElement.clientWidth and -Height always gives the
I want to change the URL's of a background-image property in a HTML document.
I am using document.documentElement.textContent.toLowerCase() to read a website text content, the problem is this
I'm trying to get the contents of a XML document element, but the element

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.