
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to work with document.title in JavaScript?
Use the document.title property to set the title of the document in JavaScript.
Example
You can try to run the following code to implement document.title property in JavaScript.
<!DOCTYPE html> <html> <head> <title>Demo Title</title> </head> <body> <script> var x = document.title; document.write("Our Title: "+x); </script> </body> </html>
- Related Articles
- How to display the title of a document with JavaScript?
- How to get the title and full URL of a document in JavaScript?
- How do we add document title in HTML?
- How to use the tag to define HTML document title?
- How to work with Structs in JavaScript?
- How to work with document.anchors in JavaScript?
- How to work with document.body in JavaScript?
- How to work with document.embeds in JavaScript?
- How to work with document.documentElement in JavaScript?
- How to work with document.head in JavaScript?
- How to work with document.forms in JavaScript?
- How to work with document.images in JavaScript?
- How to work with document.links in JavaScript?
- How to mark work title using cite tag in HTML?
- How do Document Databases Work?

Advertisements