Re: Re: loop in horizontal direction (php-html)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 10 August 2006 13:42, Al wrote:
> Marcus Bointon wrote:
> > On 10 Aug 2006, at 16:39, Al wrote:
> >> <td>s don't need to be terminated with </td>s
> >
> > That is, assuming you don't want your pages to validate. As closing your
> > tags is so trivially easy, it's really not worth not doing! I recently
> > encountered a site that contained 3500 unclosed font tags on a single
> > page; This is a very good way of making a browser go very slowly and eat
> > lots of memory.
> >
> > Marcus
> > --Marcus Bointon
> > Synchromedia Limited: Creators of http://www.smartmessages.net/
> > marcus@xxxxxxxxxxxxxxxxxx | http://www.synchromedia.co.uk/
>
> Best double check your facts.  W3C specs say the </td> and </tr> are
> optional. http://www.w3.org/TR/html4/index/elements.html
>
> I do it all the time and ALL my work W3C validates.  Try it.

Many closing tags are technically optional in HTML.  They are all required in 
XHTML.

Even if you are writing HTML and not XHTML or XHTML-sent-as-html (not to start 
that fight here, really!), you should use XHTML's pickier syntax.  With the 
exception of the self-closing / (which has never broken anything for me, 
ever), everything in XHTML's requirements are simply good practice anyway.

Closing your tags makes it much easier for you, the author, and others to find 
where you're ending things.  It means you tell the browser explicitly where 
things end, so the browser doesn't have to guess.  When doing anything 
interesting with CSS or Javascript, knowing explicitly exactly where your DOM 
tree breaks down is critical.  It also means that whenever you do start 
sending XHTML as XHTML, you're 90% done with your conversion already.

Really, there's no reason in 2006 to not properly close your tags other than 
pure laziness.

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux