Website Administrator

    delivering administrator solutions for your website...


New Mod Date: 07 Feb 2011
Date added: 03 Apr 2010
© 2010 Steve Campisi

Website Administrator Know How Articles

target="_new" or target="_blank"

Often misunderstood or now little known is that during development, target="_blank" was squarely aimed at those who coded using the frameset doctype definitions as specified in the frameset.dtd. And at that time it was acknowledged that some powerful frameset features could easily be used as stand alone features. And so we see many website administrators and html coders make common use of the target="_blank" code to call upon a new and separate browsing instance of a targeted website page.

Many also use target="_new" thinking this is a formal standard alternative to target="_blank". It is not. It is simply a common "target" name. Albeit this is incorrect in standard syntax. The formal syntax rules for labeling a new window dictate the html code should simply read target="new". Please bear this in mind when reviewing this article. The misspelling is intentional. Also, dont be surprised if you find one day that target="_new" suddenly stops working for you, not all browsers will support it forever. target="new" on the other hand is just fine as we shall see.

How to validate the target="_new" instruction in strict doctype! formats.

If you were seeking techniques on how to standardly validate "new" target windows in "strict" xml, xhtml, html4 or html5, you should review our target="_blank" article for those exact answers as the same rules apply to all target "blank" types, including target="_new" or target="new".


For swift and precise information on these formal reserved tags, please review the explanations at the bottom of the page.

Which "new" usage is correct: target="_new" or target="new"?

If you still think target="_new", is correct, you might want to review our tiny "_new" correction article.

On mastering the target="_new" instruction.

This page will give you more insight into the popular call used to open a new browser window (or tab) with the target="_new", target="new", (or similar) and goes on to explain how we can set up our own special "new" window(s) for our visitor to serve them varied specialized or compartmented information.

Example correct usage code for the target="_new" instruction.

<a href="http://www.websiteadministrator.com.au/articles.html" target="new">Website Administrator Tips</a>

The underscore " _ " character is used in the four formal "target" type declarations. And we could easily find merit in any wish to make formal a piece of code such as target="_new". And should a school of thought arise wishing to a popularize a dedicated window such as target="_new", we might even slightly subdue dissent amongst those whom abhor the practice of declaring new website browsing instances. The reason for this is that if we declare a common named target window using an instruction such as target="_new" (and not target="_blank"), we will potentially reduce a voluminous number of extra windows branching out in our visitor's website browser.

But there is a downside to our explicitly specifying the target="_new" code as our means of opening a new target window. The downside being that any subsequent use of target="_new", from whatever source, will overwrite our very own newly opened "_new" target window. Hence we ourselves become open to losing our exclusivity of this "new" website window.

Any Website Administrator worth his salt, will already suspect where exactly his website visitor will be eddying between his core website pages and those of his various offered external pages. These additional references are ideally very applicable to the subject of his main originating page. The savvy Website Administrator will new target="" a specifically named "target window" so as to allocate that about-to-be-opened new window with a special target "name". To see this working is the best way to understand this so let us further define this with a brief basic technical example which we can then analyze through a live "try it" demonstration;

To open one or many new windows.

What you are doing when you assign the "target" tag is preparing to set a unique identifier to the window you are going to open (This is the target).

So, if you were to identically assign one generic "name" to each of your target windows, eg. target="website_administrator" (and not target="_new" or target="_blank"), you would still cause a new, blank window to open in your website browser. The hidden difference is that the browser now knows that this new window has the identifiable name of "website_administrator". From this moment on, any future "new window" that has the reference name of "website_administrator" (by calling target="website_administrator") will open in that exact same window. To be standardly compatible, the name should begin with an alpha (a-Z) character. This is how you as a website administrator can give your website it's own browser instance.

Also, let us debunk a frame naming etiquette rumor right now. Per the W3 HTML4 doctype guidelines (linked below in this article) it is simply not true that upper case alpha letters should not be used when assigning a name to a target window.

[Click these links one after the other to see the "one window" method, they are all set to target="website_administrator" and will all load into the exact same web browser window]

And you will notice you can use the "back" tab to go back through the sequence of references in the reverse order that you called them. And we still have our main page in another window and so you can reference both windows simultaneously.



How to name "new" target windows if using onclick="window.open"

When using the onclick="window.open" method to open new target windows (for more detail, refer our target-blank article), you can enter the window.name in single quotes within the (this.href) parenthesis and after a comma. For example, onclick="window.open(this.href, 'website_administrator'); return false;"

[Click these links one after the other to see how the _new "one window" method using onclick window.open works. They are all set to onclick="window.open(this.href, 'website_administrator'); return false;" and will also all load into the same "new" web browser window]

Note: If you didn't close the target="website_administrator" example window, you will see that these onclick="window.open(this.href, 'website_administrator'); return false;" links will also load into the exact same window or tab. Also note: if you encounter any problems using the onclick method yourself, please review our target="blank" article (linked at the bottom of the page) to troubleshoot your issue.

Example uses for claiming your own "new" windows using the target command

Of course you are not limited to just one named window. A computer sales retailer may wish to have his massive selection of computer monitors and then, separately, his infinite range of keyboards open in their own unique yet common as to "class of product" windows. To do this he could specify (for example) target="monitors" and target="keyboards" in the respective links to enable this technique. This naturally opens only in two new windows or tabs. One window would open and display the target="monitors" only when clicked, the other only the target="keyboards".

As a Website Administrator, you should best know that not all words are available to for you to use with the "target" declaration. These reserved names are given in this next paragraph. And of course, this is actually falls under the heading of "Frames", and lucky for you, only consists of four words and all begin with an underscore.

Frameset basics for Website Administrators.

The Website Administrator should be aware that when using target="", the following frameset definitions hold rank on the following special reserved target="" names:





Formal Targets by definition.

All other target names that begin with "_" should either fail to open or find that target instruction ignored in any browser which strictly adheres to the W3 guidelines of coding for the standards as laid out in the W3C HTML4 frameset.dtd.

Formal usage: target="_blank"
Causes the linked url to open in a blank, new and un-named window.

Formal usage: target="_parent"
Targets the frame which originally called the frame that contains the activated link. Hence the _parent designation for this target instruction. The frame which contains the active link will remain unchanged, and it will cause the linked url to open solely into that senior (parent) frame. If there is no senior frame, the frame will reload over self.

Formal usage: target="_self"
Causes the linked url to open into the same frame that contains the active link. (The same frame you focus on with the mouse, enter key etc.)

Formal usage: target="_top"
Causes the linked url to become the window's sole senior frame and will uniquely and fully display itself in the entire window including the frame that called it. This frames command is often used to either call another "frameset" or to call the original "frameset" .html. This is also the command used to "break out of frames".

This is a simple example of a website using frames.

This page is purposely coded in HTML 4.01 Transitional as we are using "target" calls and so that you can see it would validate just fine in this doctype. If you wanted to code in "strict", review our Target Blank article linked below.



Valid CSS! Valid HTML 4.01 Transitional

| downloads | home | articles index |