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
Who is Participating?
Depending on what you want the target to be, yes.  Here's an example:

   <a href=

   <a target="_blank" href=

Or choose an alternative to _blank if you need to.
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!

<title>My page title</title>
<base href="">

Then whenever you use a link...

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

The browser actually interprets this as
Jason C. LevineNo oneCommented:
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"
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

SheharyaarSaahilAuthor Commented:
am i supposed to repalce the word "target" to "_blank" here?

im talking about the "_blank" "_self" "_parent" targets for the links and pictures.
Jason C. LevineNo oneCommented:
Rouchie has it.  Search and Replace is the way to go.
SheharyaarSaahilAuthor Commented:
cool..... never thought of using the find and replace tool.... thanks!!!!!!! ^_^
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.