W3C complience checker and conformance

Discussion in 'HTML' started by EN, May 3, 2006.

  1. EN

    EN Guest

    So,

    I have Visual Studio 2005 and did some HTML makeup, I hired a designer to do
    the graphics, and after that, I check my site on conformance.

    Guess what? Visual Studio sais: everything OK, but W3C says that
    <link> tags should not be closed by /> (empty tag) nor by </link> so a <link
    [tags]> should stay as it is.

    instead it wants a <meta> tag to be closed by </meta> and not by /> (empty
    tag)

    I must say, Visual Studio is consequent, it votes for closing through />
    (both the meta as the link tag).

    So guys and girls, is W3C kidding or what? If I stick to conformance, I get
    a very inconsequent non-xhtml of the contents of the <head> tag... but W3C
    validates it as OK.
     
    EN, May 3, 2006
    #1
    1. Advertising

  2. EN

    Jim Higson Guest

    EN wrote:

    > So,
    >
    > I have Visual Studio 2005 and did some HTML makeup, I hired a designer to
    > do the graphics, and after that, I check my site on conformance.
    >
    > Guess what? Visual Studio sais: everything OK, but W3C says that
    > <link> tags should not be closed by /> (empty tag) nor by </link> so a
    > <link
    > [tags]> should stay as it is.


    the /> closing is for CHTML. Maybe you're using HTML?

    > instead it wants a <meta> tag to be closed by </meta> and not by /> (empty
    > tag)
    >
    > I must say, Visual Studio is consequent, it votes for closing through />
    > (both the meta as the link tag).


    Suprising given that Microsoft's browser doesn't support XHTML.

    > So guys and girls, is W3C kidding or what? If I stick to conformance, I
    > get a very inconsequent non-xhtml of the contents of the <head> tag... but
    > W3C validates it as OK.


    If you want the document to be HTML, close using </foo>
    If you want the document to be XHTML, you can use either.

    If you don't want your code mangled, use a different editor.

    --
    Jim
     
    Jim Higson, May 3, 2006
    #2
    1. Advertising

  3. EN wrote:

    > Guess what? Visual Studio sais: everything OK, but W3C says that
    > <link> tags should not be closed by /> (empty tag) nor by </link> so a
    > <link
    > [tags]> should stay as it is.
    >
    > instead it wants a <meta> tag to be closed by </meta> and not by /> (empty
    > tag)


    > So guys and girls, is W3C kidding or what?


    Depends if you are working in XHTML or HTML. In HTML <link> and <meta> are
    correct, while in XHTML <link />, <link></link> and <link/> (ditto meta)
    are correct - although only one is allowed under Appendix C guidelines
    (although XHTML as text/html is silly anyway - as has been discussed many
    times before in this newsgroup).

    I've never see the W3C Markup Validator get this wrong though.

    A URL would be helpful.


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 3, 2006
    #3
  4. Jim Higson wrote:

    > If you want the document to be HTML, close using </foo>


    No, don't.

    The META element
    Start tag: required, End tag: forbidden
    http://www.w3.org/TR/html4/struct/global.html#h-7.4.4

    Document relationships: the LINK element
    Start tag: required, End tag: forbidden
    http://www.w3.org/TR/html4/struct/links.html#h-12.3

    > If you want the document to be XHTML, you can use either.


    Not if you plan to serve as text/html
    http://www.w3.org/TR/xhtml1/#C_2
    http://www.w3.org/TR/xhtml1/#C_3

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 3, 2006
    #4
  5. EN

    Jim Higson Guest

    Jim Higson wrote:

    > EN wrote:
    >
    >> So,
    >>
    >> I have Visual Studio 2005 and did some HTML makeup, I hired a designer to
    >> do the graphics, and after that, I check my site on conformance.
    >>
    >> Guess what? Visual Studio sais: everything OK, but W3C says that
    >> <link> tags should not be closed by /> (empty tag) nor by </link> so a
    >> <link
    >> [tags]> should stay as it is.

    >
    > the /> closing is for CHTML. Maybe you're using HTML?


    Oops. The X and C keys are right next to each other.

    --
    Jim
     
    Jim Higson, May 3, 2006
    #5
  6. EN

    ironcorona Guest

    David Dorward wrote:
    > EN wrote:
    >
    >> Guess what? Visual Studio sais: everything OK, but W3C says that
    >> <link> tags should not be closed by /> (empty tag) nor by </link> so a
    >> <link
    >> [tags]> should stay as it is.
    >>
    >> instead it wants a <meta> tag to be closed by </meta> and not by /> (empty
    >> tag)


    As far as I remember:
    There is no </meta> tag. <meta> is an empty tag and only has
    attributes. So in HTML <meta> is okay and in XHTML <meta /> it must be
    closed properly.

    > Depends if you are working in XHTML or HTML. In HTML <link> and <meta> are
    > correct, while in XHTML <link />, <link></link> and <link/>


    As above for <meta>. There is no </link> tag.
    HTML: <link>
    XHTML: <link />

    --
    ironcorona
     
    ironcorona, May 3, 2006
    #6
  7. EN

    Jim Higson Guest

    David Dorward wrote:

    > Jim Higson wrote:
    >
    >> If you want the document to be HTML, close using </foo>

    >
    > No, don't.
    >
    > The META element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/global.html#h-7.4.4
    >
    > Document relationships: the LINK element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/links.html#h-12.3


    Ok. It'd been so long since I'd coded using HTML.

    >> If you want the document to be XHTML, you can use either.

    >
    > Not if you plan to serve as text/html
    > http://www.w3.org/TR/xhtml1/#C_2
    > http://www.w3.org/TR/xhtml1/#C_3


    The debate continues...

    My argument is that as an optimist I like to code for the good browsers and
    then do what I can to make up for deficiencies in the bad one. In this case
    that means sending XHTML with the correct MIME type to everything except
    IE. Just like I send standards-compliant CSS to everything but IE.

    Anyway, the arguments about not serving XHTML as text/html are good ones,
    but my preference is to fall back on parsing tolerance in the crusty
    non-xhtml browser rather than worry about having to convert all my pages to
    XHMTL in the future.

    --
    Jim
     
    Jim Higson, May 3, 2006
    #7
  8. EN

    ironcorona Guest

    Jim Higson wrote:

    > The debate continues...

    [...]
    > Anyway, the arguments about not serving XHTML as text/html are good ones,
    > but my preference is to fall back on parsing tolerance in the crusty
    > non-xhtml browser rather than worry about having to convert all my pages to
    > XHMTL in the future.


    What is the argument? I'm new to this group.


    --
    ironcorona
     
    ironcorona, May 3, 2006
    #8
  9. EN

    ironcorona Guest

    EN wrote:
    > So,
    >
    > I have Visual Studio 2005 and did some HTML makeup, I hired a designer
    > to do the graphics, and after that, I check my site on conformance.
    >
    > Guess what? Visual Studio sais: everything OK, but W3C says that
    > <link> tags should not be closed by /> (empty tag) nor by </link> so a
    > <link [tags]> should stay as it is.


    Perhaps you have a problem with your DTD? It looks to me as if Visual
    Studio is writing the code as XHTML but is using the HTML 4.1 doctype

    > instead it wants a <meta> tag to be closed by </meta> and not by />
    > (empty tag)


    There is no </meta> tag. It's an empty tag.

    > So guys and girls, is W3C kidding or what? If I stick to conformance, I
    > get a very inconsequent non-xhtml of the contents of the <head> tag...
    > but W3C validates it as OK.


    I think that Larry Wall's rules about Perl apply here (slightly modified):

    #1

    [W3C] is always by definition right about how
    HTML:
     should behave. This
    means [it] has final veto power [...].
    
    #2
    
    [W3C] is allowed to change [its] mind about any matter at a later date,
    regardless of whether [it] previously invoked Rule 1.
    
    :)
    
    
    --
    ironcorona
     
    ironcorona, May 3, 2006
    #9
  10. EN

    EN Guest

    "David Dorward" <> wrote in message
    news:e3arqs$3n7$1$...
    > Jim Higson wrote:
    >
    >> If you want the document to be HTML, close using </foo>

    >
    > No, don't.
    >
    > The META element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/global.html#h-7.4.4
    >
    > Document relationships: the LINK element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/links.html#h-12.3


    Clear,

    So __both__ are wrong, visual studio is wrong for suggesting the /> ending,
    and the conformance checker for requiring a </meta> tag.

    >> If you want the document to be XHTML, you can use either.

    >
    > Not if you plan to serve as text/html
    > http://www.w3.org/TR/xhtml1/#C_2
    > http://www.w3.org/TR/xhtml1/#C_3
     
    EN, May 3, 2006
    #10
  11. EN

    EN Guest

    "Jim Higson" <> wrote in message
    news:eek:...
    > EN wrote:
    >
    >> So,
    >>
    >> I have Visual Studio 2005 and did some HTML makeup, I hired a designer to
    >> do the graphics, and after that, I check my site on conformance.
    >>
    >> Guess what? Visual Studio sais: everything OK, but W3C says that
    >> <link> tags should not be closed by /> (empty tag) nor by </link> so a
    >> <link
    >> [tags]> should stay as it is.

    >
    > the /> closing is for CHTML. Maybe you're using HTML?
    >
    >> instead it wants a <meta> tag to be closed by </meta> and not by />
    >> (empty
    >> tag)
    >>
    >> I must say, Visual Studio is consequent, it votes for closing through />
    >> (both the meta as the link tag).

    >
    > Suprising given that Microsoft's browser doesn't support XHTML.


    why do you think that? IE6 has no problems, and IE7 works fluently too.
    I tried IE6 on Windows 2000 and NT4 as well and it just works on my xhtml
    compliant site.


    >> So guys and girls, is W3C kidding or what? If I stick to conformance, I
    >> get a very inconsequent non-xhtml of the contents of the <head> tag...
    >> but
    >> W3C validates it as OK.

    >
    > If you want the document to be HTML, close using </foo>
    > If you want the document to be XHTML, you can use either.
    >
    > If you don't want your code mangled, use a different editor.


    True, I just can ignore the message.
     
    EN, May 3, 2006
    #11
  12. EN

    EN Guest

    "David Dorward" <> wrote in message
    news:e3arqs$3n7$1$...
    > Jim Higson wrote:
    >
    >> If you want the document to be HTML, close using </foo>

    >
    > No, don't.
    >
    > The META element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/global.html#h-7.4.4
    >
    > Document relationships: the LINK element
    > Start tag: required, End tag: forbidden
    > http://www.w3.org/TR/html4/struct/links.html#h-12.3


    But the links above are for the html 4.0 standard.

    I just conclude, that I'll stick to the general xhtml requirement, as I read
    at w3c that all tags needs to be closed, so I conclude that is including
    <link> and <meta>
     
    EN, May 3, 2006
    #12
  13. Jim Higson wrote:

    >>> If you want the document to be XHTML, you can use either.


    >> Not if you plan to serve as text/html
    >> http://www.w3.org/TR/xhtml1/#C_2
    >> http://www.w3.org/TR/xhtml1/#C_3

    >
    > The debate continues...


    OK, there is /some/ debate here[1]. Appendix C is pretty badly written. A
    normative part of the spec requires you to follow Appendix C before serving
    XHTML 1.0 as text/html, and then Appendix C is marked as Informative and
    phrased with such lovely language as "you may want to avoid".

    On the other hand saying: "You absolutely must do everything in this list of
    things to do. Start of list. End of list." is plain silly, so I don't
    favour that interpretation.

    But that doesn't have anything to do with the points you raise below at all,
    nor does it cover my point - which is that when serving as text/html there
    is NO choice between <link ...></link> and <link ... /> (ditto meta).

    > My argument is that as an optimist I like to code for the good browsers
    > and then do what I can to make up for deficiencies in the bad one. In this
    > case that means sending XHTML with the correct MIME type to everything
    > except IE. Just like I send standards-compliant CSS to everything but IE.


    The only browser I've done any serious poking at regarding XHTML support is
    Firefox (you might have heard of it, it is quite popular). Its (basic)
    XHTML support is far behind its HTML support (no incremental rendering, no
    document.write, its only just regained innerHTML), and its FAQ for
    developers recommends HTML 4.01 as text/html unless you are doing something
    that actually needs XHTML (such as MathML).

    > Anyway, the arguments about not serving XHTML as text/html are good ones,
    > but my preference is to fall back on parsing tolerance in the crusty
    > non-xhtml browser rather than worry about having to convert all my pages
    > to XHMTL in the future.


    I don't think it likely that there will be any such need to convert pages.

    For a start, I suspect XHTML 1.x will to turn out to be a technological cul
    de sac, and either XHTML 2.0 or WHATWGs HTML 5 turning out to be what
    people tend to use in the future.

    Secondly, there are going to be HTML 4.x and tag soup pages around for a
    very long time indeed, so user agent support isn't going to go away anytime
    soon.

    And even if it does, converting from HTML 4.x to XHTML 1.x is fairly
    trivial.

    And even if you don't want to worry about doing that in the future, writing
    XHTML 1.0 and converting it to HTML 4.01 before it gets to the client is
    even more trivial (so trivial that I do it myself - XHTML is quite a nice
    language, its just silly to serve it as text/html).


    [1] I'm the only person I know who has ever argued that the spec doesn't
    demand the following of the guidelines in Appendix C - and that was just to
    show how badly written the spec is. I come does very firmly in favour of
    following them if you are going to go with XHTML as text/html at all.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 3, 2006
    #13
  14. EN wrote:

    >>> If you want the document to be HTML, close using </foo>


    > But the links above are for the html 4.0 standard.


    HTML 4.01 actually, since you didn't specify which language you were using.
    XHTML was covered later in the posting.

    > I just conclude, that I'll stick to the general xhtml requirement, as I
    > read at w3c that all tags needs to be closed, so I conclude that is
    > including <link> and <meta>


    It does. Subject to the requirements of Appendix C.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 3, 2006
    #14
  15. EN wrote:

    >> Suprising given that Microsoft's browser doesn't support XHTML.

    >
    > why do you think that? IE6 has no problems, and IE7 works fluently too.
    > I tried IE6 on Windows 2000 and NT4 as well and it just works on my xhtml
    > compliant site.


    An HTTP resource served as text/html is supposed to be treated as tag soup
    HTML, not as XHTML. Given a document served as application/xhtml+xml,
    Internet Explorer will, by default, prompt the user to download it.
    (Serving XHTML as text/html makes using XHTML pointless, and requires that
    you follow the guidelines in Appendix C of the XHTML 1.0 spec ... which
    depend on a bug in how the majority[1] of browsers handle <foo />). Search
    an archive of newsgroup for the specifics.


    [1] Not all, just the majority

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, May 3, 2006
    #15
  16. EN

    Jim Higson Guest

    David Dorward wrote:


    > The only browser I've done any serious poking at regarding XHTML support
    > is Firefox (you might have heard of it, it is quite popular). Its (basic)
    > XHTML support is far behind its HTML support (no incremental rendering, no
    > document.write, its only just regained innerHTML), and its FAQ for
    > developers recommends HTML 4.01 as text/html unless you are doing
    > something that actually needs XHTML (such as MathML).


    Don't want to do on about it too much, but document.write and innerHTML are
    both pretty lousy ways of client-side scripting anyway. I do a lot of java
    script and hadn't even noticed they were gone.
     
    Jim Higson, May 3, 2006
    #16
  17. EN

    Mark Parnell Guest

    Mark Parnell, May 4, 2006
    #17
  18. EN

    Mark Parnell Guest

    Deciding to do something for the good of humanity, ironcorona
    <> declared in alt.html:

    > As far as I remember:
    > There is no </meta> tag.


    Not in HTML. In XHTML there is.

    > <meta> is an empty tag and only has
    > attributes.


    Only in HTML - XHTML requires that *all* elements be closed. There are a
    couple of ways of doing this, as David listed.

    > So in HTML <meta> is okay and in XHTML <meta /> it must be
    > closed properly.


    And in XHTML </meta> is a perfectly valid way of closing it.

    Ditto for </link>.

    --
    Mark Parnell
    My Usenet is improved; yours could be too:
    http://blinkynet.net/comp/uip5.html
     
    Mark Parnell, May 4, 2006
    #18
  19. EN

    ironcorona Guest

    Mark Parnell wrote:
    > Deciding to do something for the good of humanity, ironcorona
    > <> declared in alt.html:
    >
    >> As far as I remember:
    >> There is no </meta> tag.

    >
    > Not in HTML. In XHTML there is.
    >
    >> <meta> is an empty tag and only has
    >> attributes.

    >
    > Only in HTML - XHTML requires that *all* elements be closed. There are a
    > couple of ways of doing this, as David listed.
    >
    >> So in HTML <meta> is okay and in XHTML <meta /> it must be
    >> closed properly.

    >
    > And in XHTML </meta> is a perfectly valid way of closing it.
    >
    > Ditto for </link>.


    Really? But they're empty! Is there an </img> tag too?
    http://www.w3.org/TR/xhtml1/#guidelines
    Just looked it up. You can do it because its part of XML but W3C seems
    to be saying not to use it if at all possible.


    --
    ironcorona
     
    ironcorona, May 4, 2006
    #19
  20. EN

    Neredbojias Guest

    To further the education of mankind, Jim Higson <> vouchsafed:

    > David Dorward wrote:
    >
    >
    >> The only browser I've done any serious poking at regarding XHTML
    >> support is Firefox (you might have heard of it, it is quite popular).
    >> Its (basic) XHTML support is far behind its HTML support (no
    >> incremental rendering, no document.write, its only just regained
    >> innerHTML), and its FAQ for developers recommends HTML 4.01 as
    >> text/html unless you are doing something that actually needs XHTML
    >> (such as MathML).

    >
    > Don't want to do on about it too much, but document.write and
    > innerHTML are both pretty lousy ways of client-side scripting anyway.
    > I do a lot of java script and hadn't even noticed they were gone.


    I disagree highly with your take re. the document.write function. It's a
    very facile and semantically-appropriate way to have pages gracefully
    degrade for users without active javascript.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, May 4, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. T.J.

    Triple-A conformance?

    T.J., Dec 14, 2003, in forum: HTML
    Replies:
    20
    Views:
    781
    brucie
    Dec 16, 2003
  2. Frank
    Replies:
    9
    Views:
    1,571
    David Dorward
    May 3, 2004
  3. Amarendra GODBOLE
    Replies:
    25
    Views:
    691
    Dan Pop
    Jan 21, 2004
  4. Pager O Rama

    MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS

    Pager O Rama, Apr 4, 2006, in forum: ASP General
    Replies:
    0
    Views:
    248
    Pager O Rama
    Apr 4, 2006
  5. Jacob Grover
    Replies:
    5
    Views:
    317
    Jacob Grover
    Jul 18, 2008
Loading...

Share This Page