DOM Manipulation

document.title

document.title

document represents the current page. Some properties describe elements in the body, and others describe page-level metadata.

document.title is the text browsers use for the tab title. Assigning to it changes the document, even though the title is not a normal element inside the body.

Your task: Set the page title to JS Exercises | DOM Practice and update the visible title status to Title updated.

Prerequisites

  • dom/reading-and-writing

Tests

  • updates document.title
  • updates the visible title status
  • does not create a body title element
Loading...
Console

Run code to see output.