document.title : title « Document « JavaScript Tutorial





The title property is a read-only string that specifies the title of the document.

This property is commonly set with the tag.</p><pre><html> <head><title>My Web Page</title></head> <script> <!-- document.write(<font color="#2a00ff">"The title of this page is <i>"</font>); document.write(document.title,<font color="#2a00ff">"</i>"</font>); --> </script> </html> </pre><table><tbody> <tr><td align="left"><br/><br/><br/><script type="text/javascript"><!-- google_ad_client="pub-1130008796007602";google_ad_width=300;google_ad_height=250;google_ad_format="300x250_as";google_ad_type="text_image";google_ad_channel="";google_color_border="ffffff";google_color_bg="FFFFFF";google_color_link="0077cc";google_color_url="0077cc";google_color_text="000000"; //--></script><script type="text/javascript" src="https://web.archive.org/web/20150330070103js_/http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br/><br/></td> </tr><tr><td><br/><script type="text/javascript"><!-- google_ad_client="pub-1130008796007602";google_ad_width=300;google_ad_height=250;google_ad_format="300x250_as";google_ad_type="text_image";google_ad_channel="";google_color_border="ffffff";google_color_bg="FFFFFF";google_color_link="0077cc";google_color_url="0077cc";google_color_text="000000"; //--></script><script type="text/javascript" src="https://web.archive.org/web/20150330070103js_/http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br/><br/><br/><br/></td></tr></tbody></table><table class="table"><tr><td colspan="5">14.34.title</td></tr><tr class="odd"><td width="20"></td><td width="50">14.34.1.</td><td align="left">document.title</td></tr><tr class="even"><td width="20"></td><td width="50">14.34.2.</td><td align="left"><a href="/web/20150330070103/http://www.java2s.com/Tutorial/JavaScript/0280__Document/Assignvaluetothedocumenttitleyoumusthavethetitletaginyourhtmldocument.htm">Assign value to the document title (you must have the title tag in your html document)</a></td></tr></table></div></div><footer><p class="pull-right"><a href="https://web.archive.org/web/20150330070103/http://www.java2s.com/">java2s.com</a>  | Email:info at java2s.com | © Demo Source and Support. All rights reserved.</p></footer></div></body></html><!-- FILE ARCHIVED ON 07:01:03 Mar 30, 2015 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 22:13:31 Dec 05, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.908 exclusion.robots: 0.099 exclusion.robots.policy: 0.084 esindex: 0.014 cdx.remote: 3.817 LoadShardBlock: 79.43 (3) PetaboxLoader3.datanode: 104.202 (4) PetaboxLoader3.resolve: 47.412 (2) load_resource: 106.032 -->