Home » Questions » Computers [ Ask a new question ]

Validate .html with W3c if you set target attribute on <a>-element?

Validate .html with W3c if you set target attribute on <a>-element?

"If you set the target attribute on a element it won't validate at http://validator.w3dotorg
how doe one come around this and still have it validating?"

Asked by: Guest | Views: 292
Total answers/comments: 2
Guest [Entry]

"The target attribute is still part of the HTML 4.01 standard (and works in all browsers), but it is no longer part of XHTML (which you are probably trying to validate for). There is currently no HTML-way to emulate its effect.

There is the CSS3 Hyperlink Presentation Module draft however, that would bring back such a possibility via CSS. However it is currently not implemented by any browser."
Guest [Entry]

<a target> is perfectly valid in HTML 4.01 Transitional and XHTML 1.0 Transitional. If you must use frame-targetting, you'll need to use one of those DOCTYPEs.