how to set target for all the links at one time?

im fed of setting the target for hundreds of links one by one, is there an easy way out there to set the target for all the links\pictures present on a webpage at once?
LVL 65
SheharyaarSaahilAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RouchieCommented:
Yes, you can use a BASE HREF tag.  Whatever appears in here is automatically added to any links in the browser.  This can have bad effects on images and stuff though because the base ref is also added to them.  An example is below but I think the best option is probably the Find & Replace function!


<html>
<head>
<title>My page title</title>
<base href="http://www.mysite.com/target">
</head>


Then whenever you use a link...

<a href="file.html">Link</a>

The browser actually interprets this as http://www.mysite.com/target/file.html
Jason C. LevineDon't talk to me.Commented:
Hi SheharyaarSaahil,

I'm not sure what you mean by "target" for all the links.  Do you mean anchor?

If so, do a search and replace in the entire site, code view, for .html" and replace with .html#yourtarget"
SheharyaarSaahilAuthor Commented:
@Rouchie
am i supposed to repalce the word "target" to "_blank" here?

@jason1178
im talking about the "_blank" "_self" "_parent" targets for the links and pictures.
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

RouchieCommented:
Depending on what you want the target to be, yes.  Here's an example:

Replace:
   <a href=

With:
   <a target="_blank" href=

Or choose an alternative to _blank if you need to.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason C. LevineDon't talk to me.Commented:
Rouchie has it.  Search and Replace is the way to go.
SheharyaarSaahilAuthor Commented:
cool..... never thought of using the find and replace tool.... thanks!!!!!!! ^_^
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.