[TYPO3] target attribue is not xhtml compliant

Bernd Wilke xoonsji02 at sneakemail.com
Thu Aug 16 01:11:22 CEST 2007


On Wed, 15 Aug 2007 23:30:20 +0200, JoH asenau wrote
with subject "Re: [TYPO3] target attribue is not xhtml compliant":

> >> I have an issue with typo3 and some content types, such as the "file
> >> links" content type... When typo3 renders the webpage, it puts a
> >> target="_blank" attribute for those links.
> >>
> >> BUT target is not xhtml compliant.
> >
> > what XHTML are you using?
> >
> >
> http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodule
> >
> http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Target
> 
> AFAIK this is only valid for framesets.

not exactly.

I googled around and found:
a) HTML 4, XHTML 1.0 strict and XHTML 1.1 strict have no target attribute
to the a-tag (but a target-attribute in a base-tag which is global)
b) XHTML 2.0 seems (someone told) to have a target-attribut again, and it
will have a rel-attribute which should[1] be handled in a same way
c) target-attribute are allowed in XHTML frameset and XHTML transitional
d) you can extend the DTD of XHTML strict for the target-attribut (e.g.
PUBLIC "-//W3C//ELEMENTS XHTML Target 1.0//EN"
SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-target-1.mod") but no browser
handled (in 2005) this correctly. in worst case they will switch back to
quirksmode.
e) you still can open new windows with javascript:window.open(..url..)
f) you can insert target-functionallity in valid XHTML-strict documents
with javascript using DOM: insert the target-attribut to all a-tags with a
specific mark (e.g. something like class="external" or rel="external").
this is still valid XHTML-strict!
g) there are flamewars wether target is neccessary or not, wether target
should be allowed or not to webpage-builders

[1] there are the two worlds of theory (W3C) and reality
(browser-implementations). Still no browser is capable of all CSS2, but
there are browsers which handles the first new CSS3 attributes.


my own opinion:
I like to differentiate and therefore use the target-attribute. 
A XHTML-transitional validation is enough :-)


Bernd

-- 
Don't ask what the TYPO3-community can do for you.
Ask what you can do for the TYPO3-community.

http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list