Re: [PHP] Tidy HTML source?
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Mon, 27 Nov 2006 11:48:42 -0600 (CST)
On Mon, November 27, 2006 11:10 am, Mark Kelly wrote:
In the stuff I do almost all the HTML is generated with PHP as
basically
none of it is static (lots of tabular data, state-sensitive links,
stuff
like that).
Am I crazy to make an extra effort in my code to make the generated
HTML
pretty? By this I mean linebreaks, indentation etc. - stuff that is
aimed
at readability rather than correctness. This is obviously above and
beyond
simply making sure it validates. It's not a huge burden by any means,
but
it *is* extra effort.
What do you guys do?
If you are laying out your PHP and HTML correctly, decent readability
is not that difficult.
I don't sweat it when PHP "eats" a newline or tab for the first/last
element in a series (LI or TR or TD or...)
But I'd go *nuts* if "View Source" was all wonky.
Just because it validates doesn't mean you actually have the
layout/content that you want. :-)
And not being able to read your own HTML source will bite you in the
*** eventually.
I do wish that I had more control over the various "pretty" printing
tools for "View Source" so I could get the HTML to be indented the way
I want it...
A simple "diff" between actual HTML output and prettied up HTML from,
say, Tidy, would be pretty nifty -- I probably could have saved myself
10 hours a month, on average, in the past 10 years if I had that...
:-)
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
.
- References:
- Tidy HTML source?
- From: Mark Kelly
- Tidy HTML source?
- Prev by Date: Re: [PHP] Running AMP from CD
- Next by Date: Re: [PHP] Running AMP from CD
- Previous by thread: Tidy HTML source?
- Next by thread: Re: [PHP] Tidy HTML source?
- Index(es):