deb0and Posted February 26, 2008 Share Posted February 26, 2008 For some reason i cant seem to get this bit of code to validate and its really annoying me because i cant see a problem with it. Maybe i need a fresh pair of eyes looking at it. Here is is below <textarea rows="3" cols="60"><a target="_blank" href="http://www.caravanineurope.co.uk">Caravan sites</a> A detailed description of caravan sites in Europe.</textarea> This is what the validator says if it helps Line 321, Column 39: there is no attribute "target". <textarea rows="3" cols="60"><a target="_blank" href="http://www.caravanineurope✉ Line 321, Column 87: document type does not allow element "a" here. …ef="http://www.caravanineurope.co.uk">Caravan sites</a> A detailed descriptio thanks for all your help Quote Link to comment https://forums.phpfreaks.com/topic/93075-how-to-make-this-xhtml-validate/ Share on other sites More sharing options...
PHP Monkeh Posted February 26, 2008 Share Posted February 26, 2008 Well the link would never show within a textarea, that's why you're getting validation errors. the target="_blank" is no longer XHTML valid either, think about using onclick and calling Javascript, or maybe someone else knows a way Quote Link to comment https://forums.phpfreaks.com/topic/93075-how-to-make-this-xhtml-validate/#findComment-476911 Share on other sites More sharing options...
haku Posted February 26, 2008 Share Posted February 26, 2008 The only way it can be done keeping code valid is through javascript. That being said, the 'target' attribute was deprecated for a reason. It takes control out of the hands of the user, which goes against the policy if making the internet a usable place. Users should be able to decide if they want to open a new tab or window or what not. If they do, then they will. And if they don't they wont. If a user wants to return to the site they can use their back button. Its kind of a hard concept to grasp for people who are used to using the target attribute - I had a hard time with it when I first found out. But over time I have come to not only understand the reasoning behind it, but also fully agree with it, and I get really annoyed now when I go to sites that open new tabs and windows without my asking for it. Quote Link to comment https://forums.phpfreaks.com/topic/93075-how-to-make-this-xhtml-validate/#findComment-476984 Share on other sites More sharing options...
fenway Posted February 29, 2008 Share Posted February 29, 2008 There are other reasons for using target other than "_blank". Quote Link to comment https://forums.phpfreaks.com/topic/93075-how-to-make-this-xhtml-validate/#findComment-480078 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.