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?
 
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.
0
 
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
0
 
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"
0
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:
@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.
0
 
Jason C. LevineNo oneCommented:
Rouchie has it.  Search and Replace is the way to go.
0
 
SheharyaarSaahilAuthor Commented:
cool..... never thought of using the find and replace tool.... thanks!!!!!!! ^_^
0
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.