Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to copy the title of a web page (or what appears within the tab, the part always visible) and paste that text somewhere.

How can I do this in Chrome?

share|improve this question
add comment

3 Answers

up vote 10 down vote accepted

Use a bookmarklet:

javascript:window.prompt("Copy to clipboard: Ctrl+C, Enter",document.title);

Credit for this window.prompt trick goes to Jarek Milewski. This bookmarklet also works in ANY browser, even Netscape 3, and not just Chrome.

share|improve this answer
    
that's a great idea. –  Nick Josevski Sep 7 '11 at 6:00
    
I'm not sure what i'm supposed to do... Your talking about "bookmarklets"? –  wizlog Sep 25 '11 at 17:45
    
@wizlog: Yes bookmarklets. The above link gives step-by-step instructions. Try dragging [Copy Webpage Title](javascript:window.prompt("Copy to clipboard: Ctrl+C, Enter",document.title);) to your bookmarks bar. –  William C Sep 26 '11 at 21:05
    
@wizlog: Sorry, superuser does not support draggable bookmarklet links. –  William C Sep 26 '11 at 21:13
add comment

The above script has the annoying habit of creating a blank page with the title at the top, in plain text, making you have to go back to the page whose title you wanted to copy. At least in Firefox 24.0.

A far more effective script that keeps you on the page is:

javascript:var%20title=document.title;if(title){var%20re=/(\\|\/|:|\*|\?|\%22|<|>|\|)/gi;title=title.replace(re,'');void(prompt('Page%20Title',%20title));}
share|improve this answer
add comment

This can be achieved through the page source code:

  1. Right click on the page and select 'View Source'
  2. Look for the <title> tag
  3. Select and copy the text.

view source on a page in Chrome

share|improve this answer
1  
Assuming I understood your question correctly... –  Nick Josevski Sep 7 '11 at 3:35
    
You did... is there a shortcut though? –  wizlog Sep 7 '11 at 3:36
    
View Source keyboard shortcut is: CTRL+U –  Nick Josevski Sep 7 '11 at 3:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.