sign the guestbook email me art links pictures me home

March 19, 2004

Quick Trick - Targeting

Here's a quick trick. (All the other graphic ones are coming soon!)

I think Leen had asked about having links open up in a new page. You can have links open up in a new page by changing the target for the link.

Here's a link:

Click here for yanowhatimean.com.

And here's what it would look like in a normal page:

<a href="http://www.yanowhatimean.com">Click here for yanowhatimean.com.</a>

But here's a link that will open in a new window:

Click here for yanowhatimean.com in a new window

And here's what that looks like:

<p><a href="http://www.yanowhatimean.com" target="_blank">Click here for yanowhatimean.com</a></p>

You'll notice that there's an extra parameter after you speficy the URL of the link. This 'target' tag says how you want to open the new page. '_blank' opens in a new page. If you want to open in the same page, it's '_top'. '_top' is the default if you don't specify anything....

Unless you set you're whole page to open in a new window (which is how I have my site set up - most of the links open in a new window)

To do that, you need to add a line right above your </head> in your html file.

<base target="_blank">

</head>

Adding this line above your </head> will affect how all links on your page open, in this case, in a new window. However, if you want a certain link on your page to open up in the same page, just add the target="_top" to that specific link.

Does this make sense? There are other target parameters you can use, but that's a little more complicated. These are the most widely used ones.

Posted by Yano at March 19, 2004 12:18 PM

Comments

thank you! i've been wanting to do that for the longest! =)

Posted by: LeeN on March 19, 2004 01:10 PM

You're my hero!

Posted by: Melinda on March 19, 2004 03:35 PM

hey...i never said this, but about the entry you wrote on balancing everything in your life--you're actually the best person i've seen do that. you have a great job, you travel a lot, and your online life seems just as successful. if i had as much balance in my life as you, i'd be better for it.

cheers! there are probably more people who look up to you than you think.

--marie.

Posted by: Marie on March 19, 2004 10:49 PM


Post a comment


















home || me || pics || art || links || email || guestbook