Migrating to XHTML: empty elements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    Migrating to XHTML: empty elements

    (I'm new to these groups, so I'm not sure which one to use ...)

    XHTML has been emabled in virtually all modern browsers. So is there any
    more need for the space before the closing tags in empty elements?

    The following seems to work for me in the browser's I've got:

    <br/>

    I no longer have IE 5, but do a significant enough number of users still
    have the old browsers?

    Mark
  • Jukka K. Korpela

    #2
    Re: Migrating to XHTML: empty elements

    Mark <mark@manngo.ne t.example.net> wrote:
    [color=blue]
    > (I'm new to these groups, so I'm not sure which one to use ...)[/color]

    Then it's generally best to study the situation until you know the
    _right_ group. The choice between comp.* and alt.* is yours of course;
    usually selecting either is better than selecting both.
    [color=blue]
    > XHTML has been emabled in virtually all modern browsers.[/color]

    I guess so, assuming that "emabled" means "screwed up" or something
    like that. Try sending XHTML the right way to IE 6, and it will choke
    up (well, just ask the user where to save the data).
    [color=blue]
    > So is
    > there any more need for the space before the closing tags in empty
    > elements?[/color]

    Huh? An element has at most one closing tag.
    [color=blue]
    > The following seems to work for me in the browser's I've got:
    >
    > <br/>[/color]

    It works on IE only because IE knows neither "old" HTML nor XHTML.
    It won't work by XHTML rules, whatever you do. It secretly slurps tag
    soup in its old way, ignoring the slash because it does _not_ parse
    "old" HTML correctly.

    If you are confused, the ultimate reason is XHTML. Forget that you ever
    heard of it; ignore it as marketese, academese, or nerdese. Later if
    you'll find yourself in a situation where you need to and you can
    combine HTML-like markup with XML markup, or utilize generic XML tools
    for your HTML, _then_ it's time to learn XHTML.

    Any XHTML specification or tutorial should really contain the note
    "Kids, don't do this on the WWW (yet)".

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

    Comment

    Working...