Anne van Kesteren: Weblog 4.2

Weblog on W3C, WHATWG, HTML, CSS, DOM, XML, HTTP and more.

Your HTML level

I kind of like Levels of HTML knowledge and the way it tries to stay away from the whole HTML versus XHTML debate. Generally I see it like this:

  1. I know about tags;
  2. So XHTML is this better way without font tags, right?
  3. Using XHTML, table elements are superfluous;
  4. I know about media type issues, but I don’t care (document.write doesn’t work);
  5. I do content negotiation between XHTML as text/html and XHTML as application/xhtml+xml because I can;
  6. I do content negotiation between HTML and XHTML;
  7. All that crap, just use HTML.

Aah, controversial! Of course, there are several levels in between and after (thinking about what to use and knowing what to use for example). Just illustrating another point here.

1st June 2006

Browse through posts: main.

Comments

  1. Well, under that, I've gone from Level 6, to Level 5, and up to Level 7 :P

    Permalink · 2006-06-01 21:14:46 · Geoffrey Sneddon

  2. There's a missing level. Just use XHTML with application/xhtml+xml without content negociation.

    Permalink · 2006-06-01 21:48:57 · karl-grange

  3. Haha, at last up to level 7!

    What about those just smacking a xhtml doctype on some Frontpage code because its cool? Like most big developing companies...

    Permalink · 2006-06-01 22:01:40 · Sebastian

  4. Level 8: see the bigger picture.

    Permalink · 2006-06-02 00:07:42 · Faruk Ateş

  5. Why is it controversial? when you are often correct. Gee, you've elevated me to Level 7 by just posting this.

    Permalink · 2006-06-02 00:16:39 · Sean Fraser

  6. I follow the Web Applications 1.0 draft and pretend my websites are from a happy future!

    Permalink · 2006-06-02 01:58:32 · Anonymous

  7. I tend to agree.. I've been at stage 7 for the past few years myself, much for the reasons you outline :) (even to the extent of carefully rewriting the default MT template on my site from XHTML to HTML Strict :P)

    Permalink · 2006-06-02 07:34:14 · Eira

  8. Ah, I smell an agenda here.

    Level 9: All of the above doesn't matter.
    Level 10: (x)HTML documents can never be media independent.
    Level 11: Where the f*** is my <b> tag?

    Permalink · 2006-06-02 09:00:02 · Egor Kloos

  9. I think I'm at level 7 or something, I think I shold use ASCII text just because it works and of corse no more than 78 characters on each row and only 22 rows :-)

    However I'm working on a liquid stuff Aron design 1.0

    Permalink · 2006-06-02 12:06:55 · Aron Knifström

  10. What about "all that crap, just use HTML, but close the tags and use quotes on ALL attributes so it's at least a structured file, not just a tag soup"? :-)

    P. S. "comments are validated as XHTML"? "You need to use block level elements in order to post a comment"? Now THAT is controversial...

    Permalink · 2006-06-02 12:31:30 · Ilya Birman

  11. What about "all that crap, just use HTML, but close the tags and use quotes on ALL attributes so it's at least a structured file, not just a tag soup"? :-)

    Precisely. In short: use HTML, not tag soup.

    As for how the input of comments must be structured, that's PHP4 for you. :) Fortunately PHP5 has much better XML and HTML parsing facilities. :)

    Permalink · 2006-06-02 14:23:16 · J. King

  12. I love it! I'm at level 7 myself, largely thanks to you.

    It's a pain in the rear at my uni to hear people talking & realise that I know more than the lecturers themselves, when I'm not even doing any web design subjects. I had a short discussion with one of them, & he was convinced that everyone would be using either XHTML or XML in a few years. Yeah, like IE8 is going to come out before 2010, if it even supports them.

    OK, I'll stop with my bitching now, but it's funny how few people have a clue about some of this stuff.

    Permalink · 2006-06-02 17:51:35 · SirPavlova

  13. Now, what does this tell about people who've always stuck with plain HTML, and only switched from 3.2 to 4.0 Strict to 4.01 Strict? Can you be Level 7 without going through other levels? :-)

    Permalink · 2006-06-03 20:50:29 · Rijk

  14. Rijk, I believe one can be level 7 by only doing the XHTML stuff in one’s /test/ URI subspace. :-)

    Permalink · 2006-06-03 22:59:38 · Henri Sivonen

  15. What about "all that crap, just use HTML, but close the tags and use quotes on ALL attributes so it's at least a structured file, not just a tag soup"? :-)

    Please do not apply XML rules to HTML markup. The following is well-formed and defines a structured document:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                "http://www.w3.org/TR/html4/strict.dtd">
    <title>Short HTML doc</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <h1>Short HTML document</h1>
    <p>As SGML has a more powerful grammar than XML,
    the obvious need not be stated.
    

    Could anyone to whom this looks like tag soup please try to validate it and consult authoritative sources.

    Permalink · 2006-06-04 01:35:24 · &

  16. Feels good to be elitist, doesn't it?

    FWIW, I've been through all those phases, as you well know. Other considerations have led me to my current PoV: yes, I do like XHTML for its lowercaseness and wellformedness, but I don't see the point of app/x+x where it hurts accessibility.

    Permalink · 2006-06-04 12:03:18 · Ben de Groot

  17. Hm.. I'll admit I did change my coding style over the years. Nowadays I use lowercase element names, optional close elements, etc. It looks better that way...

    Permalink · 2006-06-04 13:16:11 · Rijk

  18. Could anyone to whom this looks like tag soup please try to validate it and consult authoritative sources.

    A major reason that I’m looking forward to HTML5 at this point is that it does away with any pretense that the markup’s based on SGML. Hooray, hooray!

    Permalink · 2006-06-05 03:21:53 · Aristotle Pagaltzis

  19. <meta http-equiv="Content-Type" content="tag/soup">

    That one's quite common

    Permalink · 2006-06-05 14:32:09 · Srđan Prodanović

  20. Right, all that crap, just use HTML just to use XHTML some (enter period of time here) later (again).

    Permalink · 2006-06-05 15:06:17 · Jens Meiert

  21. A major reason that I’m looking forward to HTML5 at this point is that it does away with any pretense that the markup’s based on SGML. Hooray, hooray!

    I agree heartily: Abandoning SGML constructs like the following, which have never been implemented in browsers, is certainly a good idea, as is the formal specification of parsing rules for HTML.

        <h1>Rare constructs</h1
        <p>Their <i/raison d’être/ is...
    

    However, the following is currently valid HTML5, and I think that is a good thing, too.

        <!DOCTYPE html>
        <title>Short HTML doc</title>
        <h1>Shorter HTML5 document</h1>
        <p>HTML may not be SGML, but being neither SGML nor XML
        is not necessarily a major disadvantage.
    

    If tags for mathematics are introduced in HTML5 (proposition currently under consideration), omission of optional tags may really become a useful feature, allowing to write e.g.* <root>3<of>8</root> as opposed to <root><order>3</order><of>8</of></root>.

    *) Anne: the <i> tag should be available for latin expressions.

    Permalink · 2006-06-05 23:01:22 · &

  22. Good to see other people on level 7

    I find myself agreeing with "&". People should realise that xhtml has been the 'future' for the past five years. It's highly unlikely to ever become anything else but the future however, so I strongly believe html5 to be the future

    *) Karl-Grange: And leave out 80+% of the internets users! Way to make your site accessible! Genious! ;)

    *) Faruk: That's already level 7. Use html and get on with the bigger picture.

    *) Anne: Why are the comments choking on xhtml wellformedness issues when the page itself is html?

    Permalink · 2006-06-06 10:07:08 · James / AkaXakA

  23. Yes! Level 7! Now if only I could get others there.

    Permalink · 2006-06-12 21:30:40 · Montoya

  24. I'm a little confused. In previous comments, I see some people posting fragments from HTML 5 without the <head> and <body> elements, but I noticed that in the working draft, a <head> element is required for the <title> element.

    Contexts in which this element may be used: In a head element containing no other title elements.

    - http://whatwg.org/specs/web-apps/current-work/#the-title

    Am I missing something?

    Permalink · 2006-06-20 18:01:35 · Thomas Higginbotham

  25. Yes.

    Permalink · 2006-06-20 19:24:37 · Anne

  26. Oh, okay. I've always included the end tags even in HTML (back when they were saying there would be no future versions of HTML -- so start preparing for XHTML).

    I've never thought of it that way though. So... if an element is assumed to belong to a parent element, then the parent's tags aren't necessary?

    Permalink · 2006-06-20 20:26:10 · Thomas Higginbotham

  27. Forgive my ignorance. I've since read through the W3C's HTML 4 spec, and everything is crystal clear now ;)

    Just when you think you've mastered something, you find there's so much more to it.

    Permalink · 2006-06-22 17:26:38 · Thomas Higginbotham

  28. <meta http-equiv="Content-Type" content="soup/x-tag-soup">

    Permalink · 2006-08-08 17:06:59 · špule

Comments are closed

Sorry, comments are closed at this time.