PDA

View Full Version : Link targets in HTML 4.0 Strict



chilipie
Sep 1st, 2004, 07:22 PM
Sorry if this sounds stupid but does anyone know how I can create link targets (so that the link will open in a new window) that still validate as HTML 4.0 Strict DTD. I have checked the W3Schools site and it says that the "target" tag is only valid in Transitional and Frameset DTD.

Also, is there a way of removing borders from images that are links either with HTML 4.0 Strict DTD or CSS?

Thanks,

gsnedders
Sep 1st, 2004, 07:25 PM
Border: In CSS put border:none;

chilipie
Sep 1st, 2004, 07:43 PM
thanks :)

where do i put "border: none;" in the css file?

gsnedders
Sep 1st, 2004, 08:02 PM
a img {
border:none;
}

mcdougals4all
Sep 1st, 2004, 08:07 PM
This method uses javascript to assign the target attribute to specified links. (http://www.sitepoint.com/article/standards-compliant-world)

gsnedders
Sep 1st, 2004, 08:08 PM
Yes, but javascript can be disabled...

chilipie
Sep 1st, 2004, 08:08 PM
:p thank you soooooooooo much! :thumbsup:

mcdougals4all
Sep 1st, 2004, 08:51 PM
Yes, but javascript can be disabled...

Fair enough. But it degrades gracefully and invisibly. The worst that happens is the link is opened in the existing window.

bradyj
Sep 1st, 2004, 08:54 PM
Fair enough. But it degrades gracefully and invisibly. The worst that happens is the link is opened in the existing window.

True. I hate target links, but this is probably the only alternative that will validate, and it does degrade nicely.

mcdougals4all
Sep 1st, 2004, 09:19 PM
I hate target links.

I agree. The only use I've had for this is to force IE to open PDF files in a new window.