• Skip to main content
  • Skip to search
  • Skip to select language
webdocs.dev
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Play New
  1. References
  2. Web APIs
  3. Window
  4. document

In this article

  • Value
  • Examples
  • Specifications
  • Browser compatibility
  1. Window
  2. Instance properties
    1. applicationCache Non-standard Deprecated
    2. closed
    3. console
    4. credentialless Experimental Non-standard
    5. customElements
    6. defaultStatus Deprecated
    7. devicePixelRatio
    8. document
    9. event Deprecated
    10. external Deprecated
    11. frameElement
    12. frames
    13. fullScreen Non-standard
    14. history
    15. innerHeight
    16. innerWidth
    17. launchQueue Experimental
    18. length
    19. localStorage
    20. location
    21. locationbar
    22. menubar
    23. mozInnerScreenX Non-standard
    24. mozInnerScreenY Non-standard
    25. name
    26. navigation Experimental
    27. navigator
    28. ondragdrop Deprecated
    29. opener
    30. orientation Deprecated
    31. outerHeight
    32. outerWidth
    33. pageXOffset
    34. pageYOffset
    35. parent
    36. personalbar
    37. scheduler
    38. screen
    39. screenLeft
    40. screenTop
    41. screenX
    42. screenY
    43. scrollbars
    44. scrollMaxX Non-standard
    45. scrollMaxY Non-standard
    46. scrollX
    47. scrollY
    48. self
    49. sessionStorage
    50. sidebar Non-standard Deprecated
    51. speechSynthesis
    52. status Deprecated
    53. statusbar
    54. toolbar
    55. top
    56. visualViewport
    57. window
  3. Instance methods
    1. alert()
    2. back() Non-standard Deprecated
    3. blur()
    4. cancelAnimationFrame()
    5. cancelIdleCallback()
    6. captureEvents() Deprecated
    7. clearImmediate()
    8. close()
    9. confirm()
    10. convertPointFromNodeToPage() Non-standard
    11. dump() Non-standard
    12. find() Non-standard
    13. focus()
    14. forward() Non-standard Deprecated
    15. getComputedStyle()
    16. getDefaultComputedStyle() Non-standard
    17. getSelection()
    18. matchMedia()
    19. moveBy()
    20. moveTo()
    21. open()
    22. postMessage()
    23. print()
    24. prompt()
    25. queryLocalFonts() Experimental
    26. releaseEvents() Deprecated
    27. requestAnimationFrame()
    28. requestFileSystem() Non-standard Deprecated
    29. requestIdleCallback()
    30. resizeBy()
    31. resizeTo()
    32. scroll()
    33. scrollBy()
    34. scrollByLines() Non-standard
    35. scrollByPages() Non-standard
    36. scrollTo()
    37. setImmediate()
    38. showDirectoryPicker() Experimental
    39. showModalDialog() Non-standard Deprecated
    40. showOpenFilePicker() Experimental
    41. showSaveFilePicker() Experimental
    42. sizeToContent() Non-standard
    43. stop()
    44. updateCommands() Non-standard
    45. webkitConvertPointFromPageToNode() Non-standard Deprecated
  4. Events
    1. afterprint
    2. appinstalled
    3. beforeinstallprompt
    4. beforeprint
    5. beforeunload
    6. blur
    7. copy
    8. cut
    9. devicemotion
    10. deviceorientation
    11. deviceorientationabsolute
    12. DOMContentLoaded
    13. error
    14. focus
    15. gamepadconnected
    16. gamepaddisconnected
    17. hashchange
    18. languagechange
    19. load
    20. message
    21. messageerror
    22. offline
    23. online
    24. orientationchange Deprecated
    25. pagehide
    26. pageshow
    27. paste
    28. popstate
    29. rejectionhandled
    30. resize
    31. storage
    32. unhandledrejection
    33. unload
    34. vrdisplayactivate Non-standard Deprecated
    35. vrdisplayconnect Non-standard Deprecated
    36. vrdisplaydeactivate Non-standard Deprecated
    37. vrdisplaydisconnect Non-standard Deprecated
    38. vrdisplaypresentchange Non-standard Deprecated
  5. Inheritance:
    1. EventTarget

In this article

  • Value
  • Examples
  • Specifications
  • Browser compatibility

Window: document property

window.document returns a reference to the document contained in the window.

Value

A document object.

Examples

js

console.log(window.document.title);

Specifications

Specification
HTML Standard
# dom-document-dev

Browser compatibility

Found a content problem with this page?

  • Edit the page on GitHub.
  • Report the content issue.
  • View the source on GitHub.
Want to get more involved? Learn how to contribute.

This page was last modified on Apr 8, 2023 by MDN contributors.

webdocs.dev
  • GitHub

Support

  • Report an issue

Our communities

  • Discord

Developers

  • Web Technologies
  • Learn Web Development

Portions of this content are ©1998–2025 by individual contributors. Content available under a Creative Commons license.