silly question (<a>)

I have several links whose only purpose is to contain information without taking up much screen space, ie the users right click on these one word links and "copy link location" to get several hundred characters of text.

my question is - is there any way for me to have just that text in the link? ie, without "http://" without relative paths or any other tags (mailto:, etc)?  If not, what's the least amount of extra text I can get it to display?

Who is Participating?
lexxwernConnect With a Mentor Commented:
i dont think that is possible. sorry.
all browsers automatically add he environment path to the link.
<a nohref ... ></a>
_D_Author Commented:
hmm, nohref seems to be an <area> thing for image maps
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

nohref can be used anywhere href is used. please explain futher if this isn't what you are looking for.
or this may help too
<a href="#" ... ></a>
_D_Author Commented:
nohref definitely doesn't help here.
I need to have a link: <a href='text'>link</a>
and be able to right-click on it and copy 'text', not 'http://relative/path/text'

with # it sets it up as an acnchor on the current page, the URI for the page is added to the link.
Indeed is impossible to do.
You could use a javascript popup window with the text in it. The use could copy the text then close the window when they are done. Not quite as easy as a right click, but it would work and take away the need to remove the http:
i think _D_ is doing this because he has a website that uses frames and he wants to protect the actual path of the page? am i correct _D_?
<a href="JavaScript:x('1')">link</a>

Then put this in the head:
<script language="JavaScript">

_D_Author Commented:
lexx, no actually, I have a lot of text (hundreds of characters) that has to be available to the user, but not take up all of the screen space.  right now I did a <a href='text:textdatathatineed'> and the user just has to delete the 'text:' after copying and pasting, which works, I guess, but if anyone has any better ideas, I'm all ears.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.