Submit Your Article Forum Rules

Results 1 to 8 of 8

Thread: Why XHTML is useless.

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    519

    Why XHTML is useless.

    Ok it's not totally useless but it's got a long way to go to be really useful. I have been making my new project in XHTML just for the sake of being upto date as some other members seem to think that any site not made in XHTML is antiquated. Anyways after making 8 pages in XHTML 1.0 strict, making sure they were all validated etc, I noticed an offsite link so went to add the target="" attribute, but what do you know, target="" is not valid XHTML. In fact there is no way, short of javascript, of opening a new window using XHTML. This is why I'm going back to HTML.

  2. #2
    Senior Member Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230

    target="" phased out

    Yeah, the target attribute is being phased out. It is still okay for transitional XHTML, but not for strict. Like you said, JavaScript is basically the only way to do it now.

    There is a good article called New-Window Links in a Standards-Compliant World that describes a little about why it was done, and provides a very good section of JavaScript to open new windows. The article is located at http://www.sitepoint.com/article/1041.

    The target attribute, along with other window controls, is still part of the DOM 2.0 standard, and should be in the future. Basically, XHTML is purely designed for content. Any actions performed are now to be done through the DOM by way of a scripting language such as JavaScript.
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    519
    Yes but I'd sooner avoid javascript as not everybrowser supports it and some users have it switched off.

  4. #4
    Senior Member Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230

    JavaScript, etc.

    Yeah, that definitely gets to be a problem. Do any browsers install with JavaScript turned off by default? I always leave it on (unless I'm testing something for a NOSCRIPT tag), but always have Opera set to only open requested popups. That takes care of my biggest headache with JavaScript.

    Hey, I just found a page with a description of doing the target without JavaScript. It's at http://www.accessify.com/tutorials/s...ew-windows.asp. Basically it entails adding a non-deprecated module to XHTML. The W3C let the XHTML document type definition be flexible so that you can add your own modules. If you host the DTD on your own site, then refer to it in your DOCTYPE, you can add the target function and still be compliant! Pretty neat. I'll have to remember this one.
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

  5. #5
    Senior Member ranjan's Avatar
    Join Date
    Sep 2003
    Posts
    152
    but what do you know, target="" is not valid XHTML
    It is not valid HTML either. Its deprecated, which means you can only use the attribute with Transitional DTDs
    ranjan | Macromedia Certified Dreamweaver MX Developer
    http://www.dreamlettes.net - a dreamweaver resource
    http://www.ranjan.ws - got blog?
    http://www.total-impact.com - a web design community

  6. #6
    Senior Member
    Join Date
    Jul 2003
    Posts
    519
    Yes but at least it validates in transitional HTML which iis kind of my point, to get a new window in XHTML with valid code that not javascript is almost as much work as writing a piece of software.

  7. #7
    Senior Member Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230

    XHTML and the "target" attribute

    The target attribute is still valid for XHTML 1.0 transitional, but not at all in 1.1. Their explanation was that XHTML is concerned only with content. Any layout issues are covered by CSS, and any "actions" are covered by the DOM, usually with JavaScript (ECMAScript).
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

  8. #8
    Senior Member
    Join Date
    Jul 2003
    Posts
    519
    Well I redid the site in HTML 4.01 transitional but I'll try it as XHTML 1.1 transitional. Lets be honest it's just a case of putting in some \ at the end of certain tags as all of the formatting is handled by CSS.

Similar Threads

  1. SE submission is USELESS
    By silin in forum Search Engine Optimization Forum
    Replies: 30
    Last Post: 09-15-2009, 12:52 AM
  2. Xhtml strict 1.0 vs xhtml 1.1
    By John-pr in forum Web Programming Discussion Forum
    Replies: 9
    Last Post: 11-08-2006, 02:09 PM
  3. Is this link useless???
    By HellaCooL in forum Search Engine Optimization Forum
    Replies: 7
    Last Post: 06-23-2004, 08:29 PM
  4. Coded links are useless?
    By Russell Wright in forum Search Engine Optimization Forum
    Replies: 1
    Last Post: 03-21-2004, 03:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •