Results 1 to 5 of 5

Thread: W3c Confirmation

  1. #1
    Join Date
    Jul 2008
    Posts
    102
    Thanks
    36
    Thanked 6 Times in 6 Posts

    Default W3c Confirmation

    So I really want to stick by the W3c stuff and have done so far, had large amounts of workarounds to do and so far happy to say everything conforms. However; (<-there always one of these everywhere I go)

    Code:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-gb" />
    <title>Some Random Title</title>
    </head>
    <body>
    
    <div>
     <img src="/test.png" alt="test" />
    </div>
    
    </body>
    </html>
    Will pass the validator no problems all's good until I found something on w3.org which didnt add up;
    http://www.w3.org/TR/REC-html40/struct/objects.html

    Can you see every tag is written in capitals and to provide how bad this is just enter this code into the validator and you will see;

    Code:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-gb" />
    <title>Some random title</title>
    </head>
    <body>
    
    <div>
     <IMG src="/test.png" alt="test" />
    </div>
    
    </body>
    </html>
    The validator can be found here; http://validator.w3.org/

    So whats the score? Why would that have bad code on there?

    Kind regards
    Dal

    Edit: Edited by ddadmin to remove page title, as requested
    Last edited by ddadmin; 09-01-2008 at 06:38 PM.
    Programmers are tools used to convert Caffeine to code

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You are using an XHTML doctype and I believe (correct me if I'm wrong) that all tags in XML have to be lowercase. The page you linked to with the documentation is for HTML 4 and not XHTML:
    http://www.w3.org/TR/xhtml1/

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. The Following User Says Thank You to thetestingsite For This Useful Post:

    Dal (07-27-2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    102
    Thanks
    36
    Thanked 6 Times in 6 Posts

    Default

    Doh - I went off the path at some point and found this page, I didnt think to check what it was refering to. Oh well, I knew I had to keep it lowercase and when I saw all that horrible uppercase stuff I went off the handle. Im pleased now that I didnt go running off to the W3C forum and make a twit of myself, ... Ooops I kind of did this anyway here :*

    Hey all this wasnt me, someone hijacked my account MOD!

    Thanks for driving that one home thetestingsite
    Kind regards
    Dal
    Programmers are tools used to convert Caffeine to code

  5. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You almost certainly shouldn't be using XHTML at this point. IE has no support for it, and as a result there is nothing to be gained and quite a bit to be lost from using it (if you intend to support IE). See http://www.webdevout.net/articles/beware-of-xhtml and http://www.hixie.ch/advocacy/xhtml for more details.

    The document to which you linked was in and on HTML 4. HTML 4 is case-insensitive, and there is no recommendation governing the use of case: it is entirely up to the author's discretion. The W3C use capitals for many things in their standards, but that is not meant to be a universal convention, and many authors prefer using all lowercase in case the document should need to be transformed into some form of XML at some point.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. The Following User Says Thank You to Twey For This Useful Post:

    Dal (07-27-2008)

  7. #5
    Join Date
    Jul 2008
    Posts
    102
    Thanks
    36
    Thanked 6 Times in 6 Posts

    Default

    Ill keep a bookmark of them articles but Im unsure as to why XHTML is an issue. For a start IE doesnt work, no I mean its NOT W3C compliant and everyone knows that its a pain in the proverb.

    Also this part was from the first arcticle but the website loads in gradual as if you would expect it too and no errors on any (IE7,IE8(beta),FF2,FF3,Safari 3.1.1,Opera (latest), Avant, and flock I know the last 2 are using IE and Gecko engine) If it wasnt supported or failed in any way then W3C wouldnt have a validation for it, Since the aim of the W3C is to recommend building practices they certainly wouldnt support what these articles claim.
    Firefox and other problems
    Up

    Although Firefox supports the parsing of XHTML documents as XML when sent with the application/xhtml+xml content type, its performance in versions 2.0 and below is actually worse than with HTML. When parsing a page as HTML, Firefox will begin displaying the page while the content is being downloaded. This is called incremental rendering. However, when it's parsing XML content, Firefox 2.0 and below will wait until the entire page is downloaded and checked for well-formedness before any of the content is displayed. This means that, although in theory XML is supposed to be faster to parse than HTML, in reality these versions of Firefox usually display HTML content to the user much faster than XHTML/XML content. Thankfully, this issue is expected to be resolved in Firefox 3.0.
    Thanks
    Dal
    Programmers are tools used to convert Caffeine to code

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
  •