SitePoint Sponsor

User Tag List

Page 3 of 9 FirstFirst 1234567 ... LastLast
Results 51 to 75 of 213

Thread: Web Standards Test: How many of the Top 100 Sites validate?

  1. #51
    SitePoint Evangelist SitePoint Award Recipient captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    425
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I sometimes wonder why these topics get so religious and dogmatic. My own pragmatic point of view is that writing valid code is no more difficult than writing invalid code. That libraries produce invalid code, well, it's not all that difficult to fix a library and it's a big help. I've had to do it with some of my own and a one time fix improves a lot of pages down the line.

    As for search engines, their job is not to discriminate against bad code but to return the best possible results. If 95% of the biggest websites use bad code, search engines are forced to deal with it (just as we are forced to deal with non-standard compliant browsers) but that does not mean they would prefer invalid code.

    I can't find a single reason for me not to write valid code. But that's just me and I'm quite happy when the competition writes crappy websites, we do so much better in Google for it. It's their loss, our gain.
    Denny Schlesinger
    web services

  2. #52
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why on earth should I listen to Zeldman if his own site doesn't pass validation, creating a ( as I call it ) yellow screen of death when sent as the real MIME type.

    XML Parsing Error: mismatched tag. Expected: </dd>.
    Location: http://localhost/zeldman.html
    Line Number 385, Column 79dd>Besides emceeing with Eric Meyer, I’ll cover the following topics/p>
    Cross browser css bugs

    Dan Schulz you will be missed

  3. #53
    SitePoint Member julianmag's Avatar
    Join Date
    Jul 2007
    Location
    Montevideo
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha, good research SoulScratch I am impressed how this man Zeldman can talk about standards if his own website do not pass validation


    Quote Originally Posted by SoulScratch View Post
    Why on earth should I listen to Zeldman if his own site doesn't pass validation, creating a ( as I call it ) yellow screen of death when sent as the real MIME type.

  4. #54
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by captainccs View Post
    I always figured that Xhtml was the XML version of HTML...
    That's right. It's a reformulation of HTML4 as an application of XML 1.0. That means it should be served as an application of XML.

    Anything you serve as text/html is HTML as far as user agents are concerned. (I think I should program that sentence to a function key, I seem to write it so often.) Whether the author wrote HTML or XHTML markup, plain text, a Word document or a JPEG image, user agents must try to interpret it as HTML if it's served with that MIME type.

    Quote Originally Posted by captainccs View Post
    As for validation, running my code through the W3C validator is a cheap way to catch bugs so why not do it?
    Absolutely! But you can validate HTML just as well as XHTML (actually slightly better). And what's the point of validating it as XHTML if you're serving it as HTML?

    Quote Originally Posted by captainccs View Post
    Since I now have your word that I'm not really wasting my time, I'll continue to use Xhtlm, thanks!
    No, you'll continue to serve invalid HTML and relying on browser bugs.

    Quote Originally Posted by glenngould View Post
    Mr. Zeldman just claimed Internet Explorer 'supports' XHTML.
    He's wrong. Internet Explorer supports certain forms of invalid HTML that are consistent with the subset of XHTML 1.0 outlined in Appendix C of the specification. It doesn't support XHTML markup in general, even if it's served as text/html.

    Try the following document, for instance. If served as an application of XML it will work just fine in supporting browsers. But try serving it as text/html to IE (or any other browser)...
    Code XML:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>An XHTML Document</title>
        <script type="text/javascript" src="hello.js"/>
      </head>
      <body>
        <p>Hello, World!</p>
      </body>
    </html>
    And the hello.js file:
    Code JavaScript:
    alert("Hello, World!");
    Birnam wood is come to Dunsinane

  5. #55
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.zeldman.com/2009/03/05/we...#comment-41020

    Yay! Nothing like correcting one of, if not the most popular web designer on earth ;p
    Last edited by SoulScratch; Mar 7, 2009 at 10:39.
    Cross browser css bugs

    Dan Schulz you will be missed

  6. #56
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This guy is really hopeless. I mean... , is something wrong with him? I shouldn't have bothered to write all those posts.

  7. #57
    SitePoint Member julianmag's Avatar
    Join Date
    Jul 2007
    Location
    Montevideo
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs down

    Well... moreover, his own page is XHTML 1.0 Transitional. This guy forgot that he is using Wordpress. At least if he was able to "teach" others how to write web pages, may start looking his own site, first.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  8. #58
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,470
    Mentioned
    35 Post(s)
    Tagged
    1 Thread(s)
    which "guy" are you guys talking about? zeldman?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  9. #59
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I, for one, am talking about this hopeless guy who calls himself 'drhoward'.

  10. #60
    i want cake and cookies Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    9,997
    Mentioned
    41 Post(s)
    Tagged
    1 Thread(s)
    LAMP meant Doc, and julian meant Zeldman.

    Soulscratch, Do you wonder why he suddenly goes off to "what about HTML5?"

    Like there's even a point. What might be invalid HTML5 today might be valid tomorrow. It's like playing Calvinball-- sure it's fun, but currently hard to play by the rules : )

  11. #61
    SitePoint Member julianmag's Avatar
    Join Date
    Jul 2007
    Location
    Montevideo
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Stomme,
    Yes, thanks for clarify.

    Quote Originally Posted by Stomme poes View Post
    LAMP meant Doc, and julian meant Zeldman.

  12. #62
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,470
    Mentioned
    35 Post(s)
    Tagged
    1 Thread(s)
    okay, as a moderator i have to say this -- let's everybody be very very careful not to be disrespectful of other members

    use of adjectives like "hopeless" to describe another member is not allowed (not to pick on anyone; this was just the nearest example)
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  13. #63
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You can serve your websites appropriately as XHTML (if you wish) as long as you use a serverside script to detect if the browser in question does support the language. If it cannot serve it correctly with the right mime-type then you are required so simply serve the document as appropriately as HTML 4.01 or XHTML 1.0 with text/html. I see no reason why people should not take advantage of the technology as it exists for example, I used XHTML to trigger a clever little XML embed once so that I could directly import the RSS feed into the news page (as opposed to producing an RSS feed from the page – thus separating content from structure). I just feel due to the lack of complete support people strongly treat XHTML like the plague, personally I feel that it does have genuine uses and you can give benefits to browsers which support it effectively.

  14. #64
    SitePoint Evangelist SitePoint Award Recipient captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    425
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I just ran a Google search on "Why use XHTML" and the top item is:

    XHTML - Why?

    I have to say that if XHTML is good enough for W3C it's good enough for me.

    Also...

    So What's Wrong with HTML?

    HTML is the set of codes (the "markup language") that a writer puts into a document to make it displayable on the World Wide Web. HTML (HyperText Markup Language) has been the lingua franca of the World Wide Web since its inception in 1990. It has gone through several revisions, and is now at version 4. Although it has been enormously successful, the language is no longer suitable as a basis for the deployment of commercial and industrial web-based applications on the Internet and intranets.

    HTML will not go through another revision, except as an application of XML, i.e. XHTML. HTML has been enormously successful and I fully expect XHTML to be of great interest to web developers now that it's a W3C Recommendation.

    From: Introduction to XHTML: Why do we need XHTML?
    So, what's the problem? Bad browsers?
    Denny Schlesinger
    web services

  15. #65
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You should only use it if you feel it is required, there is no point overcomplicating matters, XHTML is not an "upgrade" for HTML, its a very purposeful alternative.

    That quote is just plain wrong, there is no reason why it would be unsuitable for web based applications, in fact in that matter XHTML offers no genuine advantages in its purpose over HTML for application development (not only that, most web applications today use HTML for the structure successfully). Secondly the fact HTML 5.0 (which is not part of the XHTML family) is being released shows that article is simply inaccurate and heavily outdated.

    The problem is Internet Explorer cannot, and will not use XHTML with the correct mime type, and in the case of XHTML 1.1 not using the correct mime-type invalidates the entire basis of the code and without that mime-type being served correctly, it isnt XHTML, its simply HTML with the wrong doctype declaration.

  16. #66
    SitePoint Guru glenngould's Avatar
    Join Date
    Nov 2005
    Posts
    660
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fully expect XHTML to be of great interest to web developers now that it's a W3C Recommendation.
    W3C does not recommend XHTML over HTML. Here is the HTML recommendation.
    Trend Blocker blocks curiosity-clicks to Twitter trends | Open All Trends opens all Twitter trends in a new tab

  17. #67
    SitePoint Evangelist SitePoint Award Recipient captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    425
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I want to test this myself. How do you serve xhtml as xml and not as "text/html"?

    Does it need a different DOC type or something?
    Denny Schlesinger
    web services

  18. #68
    Non-Member Musicbox's Avatar
    Join Date
    Nov 2004
    Location
    india
    Posts
    1,331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    they have huge traffic and i think they use proper code which doesnt needs them to revalidate

  19. #69
    SitePoint Addict tuxus's Avatar
    Join Date
    Feb 2009
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by captainccs View Post
    I want to test this myself. How do you serve xhtml as xml and not as "text/html"?

    Does it need a different DOC type or something?
    A few different methods exist but using php you can do:

    Code:
    <?php
    
            if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) {
    
              header("Content-Type: application/xhtml+xml; charset=iso-8859-1");
    
              echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"no\"?>\n";
    
            } else
    
              header("Content-type: text/html; charser=iso-8859-1");
            ?>

  20. #70
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Tuxus, that will not serve it correctly, yes it will provide the correct mime type however it will not serve the right doctype... think of it like this, in internet explorer it does not support XHTML 1.1 yet what you provide will still declare XHTML 1.1 whether it works or not... and then will give the invalid mime-type of text/html violating the rules on XHTML 1.1. I will find the script I use and post it here for anyone wanting to CORRECTLY declare both mime type and XHTML doctype.

  21. #71
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    OK, here is the PHP script I put together and use, if the browser supports XHTML 1.1, it will serve the following properly...

    • MIME-Type (via headers, application/xhtml-xml if 1.1, text/html if 1.0)
    • XML heading (declaration - if XHTML 1.1).
    • XML Stylesheets (dynamically using XML to push style rather then using link, as preferred in the XML specification - if XHTML 1.1).
    • Doctype (XHTML 1.1 if supported / XHTML 1.0 - if not).
    • Language (xml:lang if 1.1, lang if 1.0)
    • Content-type (on top of the MIME-declaration for XHTML 1.0)


    Basically if the browser supports 1.1, it'll issue it properly, if not, it'll issue 1.0 properly.

    PHP Code:
    <?php //Setting the correct MIME-Type.
    if ($_SERVER["HTTP_ACCEPT"] != null
        
    && strpos($_SERVER['HTTP_ACCEPT'], "application/xhtml+xml") == false) {
        
    $xhtmltype "1.0";
        
    header("Content-type: text/html; charset=utf-8");
    } else {
        
    $xhtmltype "1.1";
        
    header("Content-type: application/xhtml+xml; charset=utf-8");
    }
    ?>
    <?php 
    //Setting the correct Doctype.
    if ($xhtmltype == "1.1") {
        echo 
    "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        echo 
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
        echo 
    "<?xml-stylesheet href=\"/style/screen.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\"?>\n";
    } else {
        echo 
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
    }
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml" <?php if ($xhtmltype == "1.0") {echo "lang=\"en\"";} else {echo "xml:lang=\"en\"";} ?>>
        <head>
            <title>Your title here!</title>
    <?php //Setting the correct Content-Type.
    if ($xhtmltype == "1.0") {
        echo 
    "\t\t<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\"/>\n";
        echo 
    "\t\t<link href=\"/style/screen.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />\n";
    }
    ?>
    Basically, this will serve everything properly and cover's all the basis I could think of, so use as required and enjoy XHTML 1.1 which works!

  22. #72
    SitePoint Addict tuxus's Avatar
    Join Date
    Feb 2009
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct I only provided the part for the MIME, I use Apache content negotiation to deal with doctype. I suppose my solution isn't exactly elegant but I havn't got around to changing it so meh. To be clear what I'm saying alex is I use apache to do the work for me, the php script as you mentioned only does half the job, I should have thought before I posted it lol

  23. #73
    SitePoint Evangelist SitePoint Award Recipient captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    425
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    Tuxus, that will not serve it correctly, yes it will provide the correct mime type however it will not serve the right doctype... think of it like this, in internet explorer it does not support XHTML 1.1 yet what you provide will still declare XHTML 1.1 whether it works or not... and then will give the invalid mime-type of text/html violating the rules on XHTML 1.1. I will find the script I use and post it here for anyone wanting to CORRECTLY declare both mime type and XHTML doctype.
    I get this

    This page contains the following errors:

    error on line 7 at column 66: Document is empty
    Below is a rendering of the page up to the first error.
    Col 66 is right after the "?>" in the echo line.
    Denny Schlesinger
    web services

  24. #74
    SitePoint Addict tuxus's Avatar
    Join Date
    Feb 2009
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try whats mentioned here: http://perishablepress.com/press/200...-and-htaccess/ should work

  25. #75
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    internet explorer it does not support XHTML 1.1 yet
    Microsoft already stated IE9 will not support XHTML either.

Tags for this Thread

Bookmarks

Posting Permissions

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