in reply to Re: (boo)Re: CGI IMG tag error
in thread CGI IMG tag error

In HTML, closing P tags is often unnecessary (since, let's face it, as things stand HTML is about presentation as well as content). A subsequent opening P tag implies that the previous paragraph has ended. In a fairly smallish SGML application with a fixed set of tags with more-or-less well defined meanings such as HTML, you can get away with such things. But in XML, where golly knows ( and golly != the XML parser ) what each tag is supposed to mean, you can't take such liberties. So even though XHTML is a descendant of HTML, since it is an application of XML, it's ipso facto gotta conform to the XML standard.

Weasel words courtesy [ favourite local politician ]

perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Replies are listed 'Best First'.
Re: Re: Re: (boo)Re: CGI IMG tag error
by RatArsed (Monk) on Jun 11, 2001 at 13:22 UTC
    A few rants:
    1) HTML is structural, which can infer presentation, but it is not presentational itself (that's what CSS is for)
    2) Being really picky here, but <p> marks the start of the paragraph, and always has done.

    Right, to go back to the original question; In xml (and therefore in xhtml), you cannot has empty elements, so <img> is invalid. <img></img> is not (although completely pointless). As a shorthand elements that contain no data can be abbreviated to <img /> which is what is being spewed out by CGI.pm in this instance.

    --
    RatArsed