Re: An HTML Announcement of perl-5.12.0 on The Perl Foundation Blog

[email protected] (Mark Mielke) Sun, 25 Apr 2010 14:42:41 -0400
Newsgroups perl.advocacy,perl.perl5.porters
Message-ID <[email protected]>
On 04/23/2010 05:26 PM, Eric Brine wrote:
> On Fri, Apr 23, 2010 at 5:04 PM, Shlomi Fish<[email protected]>  wrote:
>    
>> I'm not sure even HTML 4.0 still allows stray opening tags (such as<p>  or
>> <td>  or
>> whatever).
>>      
> "stray"? It most definitely allows the end tag to be omitted for certain
> elements. (Of those elements, I used P, LI, TBODY, TR and TD) . It even
> allows the opening tags of certain elements to be omitted. (Those elements
> are HTML, HEAD, BODY, TBODY and no other.)
>    

Allow, but not necessarily recommend or advocate. Closing tags gives the 
processor more explicit instructions on how to deal with ambiguities, 
and let's the code be checked for good form. I close all my tags as a 
matter of principle. Unless there is some harm in doing so - I think it 
is a good practice.

>>   >  In fact, I couldn't make it make it compliant with both HTML and XHTML
>>      
>>> because I used HR.
>>>        
>> What is HR in this context?
>>      
> The HR element.
>
>             Valid  Valid
>             HTML   XHTML
> ---------  -----  -----
> <hr>         yes    no
> <hr/>        no     yes
> <hr></hr>    no     yes
>    

The combined open close tags such as <hr/> should be used with a space 
before the / to make sure it works on old and new browsers.

Try: <hr />

Again, it's just a good practice.

Cheers,
mark