|
|
Author: * Bryce Yupanqui -
0 Posts
on this thread out of
708 Posts
sitewide.
Date: Nov 13, 2003 - 09:37
Using the target syntax, a new browser window can be opened with regular html. Lately however, I have seen some code slinging here (3 instances since yesterday) where the syntax is not correct, so that the link does not open in a new browser window but instead in the parent browser window. That and my own neglect in testing before I post has inspired this.
Here is the most frequent syntax error I've seen: <a href="http://www.ancientworlds.net" target"new">AncientWorlds<a>
- First, the value needs to have an equals sign between it and the target, as in target="_new".
- Second, the use of new, blank, etc. all need to have an underscore in front of the word, as in _new, _blank, etc.
Here are two live examples: one executing the malformed code from above and the second executing better formed html. Note this post will disappear as the site loads in this browser window. Hit your back button to return and try the second example.
Example1 Incorrect syntax: <a href="http://www.ancientworlds.net" target"new">AncientWorlds<a>
AncientWorlds
Example2 Correct syntax: <a href="http://www.ancientworlds.net target="_new">AncientWorlds<a>
AncientWorlds
I am SO guilty of not completely testing my code before posting, so these instances have been a reminder to me to do so. I'd like to point an Arachne tool that will let you test your code before posting, so that formatting and links can be checked before posting or sharing code with others. It is here: HTML Test Bed
|
|