Lawrence @ Rogers wrote:

> On 27/01/2011 4:15 AM, Per Jessen wrote:
>> I've just been looking at a mail that got a hit on
>> HTML_TAG_BALANCE_HEAD due to this:
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";> <html
>> xmlns="http://www.w3.org/1999/xhtml";> <head/>
>> <body style="width: 800px">
>>
>> I can't quite figure out whether the short tag syntax is allowed -
>> the HTML above was generated by XSLT based on this input:
>>
>> <head></head>
>>
>> Other "popular" short tags:<br/>  <div/>  <p/>  - I don't think we
>> should be judging those to be unbalanced HTML tags.
>>
>>
>> /Per Jessen, Zürich
>>
>>
> As a person who writes HTML/XHTML every single day, there are several
> flaws in your argument:
> 
> - <head/> is not valid HTML or XHTML (in any version)

Ah, because it needs at least <title>. Okay.

> - HTML 4.01 Transitional doesn't allow for an XHTML xmlns attribute,
> nor does it permit "short tags"

Irrelevant for this issue. Spamassassin doesn't care about the DTD when
it's evaluating for unbalanced tags.  Use your imagtion and put any
suitable DTD instead.

> - The only "valid" short tag that you mentioned is <br />. <div/> and
> <p/> are not

They're certainly all valid in XHTML. (the validator at w3c says ok for
both).

> - Using a short tag without a space between the name and the / is also
> not recommended as it causes problems for older browsers and poorly
> written HTML parsers.

Irrelevant for this issue.

> You appear to have made a flawed statement based upon a flawed study

Gee, what's with the hostility?  I never made an argument, I asked a
simple question. 

> (no HTML e-mail will ever be just a <head></head> combination)

I didn't suggest that. 


/Per Jessen, Zürich

Reply via email to