Re: [PHP] Tidy HTML source?



At 5:10 PM +0000 11/27/06, Mark Kelly wrote:
Hi.

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?

All my coding in all languages is pretty. To me ,it's simply an addition to documentation.

Sure it takes more time, but if I ever have to reuse the code, it's a snap to figure things out. Besides, it helps me organize and write better code.

However, most of the pretty html stuff is covered by css -- but that too (for my work) is generated by php. They all go together.

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.



Relevant Pages

  • Re: How do we get there from here?
    ... > then sub the whole of that generated markup into the template? ... layed out on the fly, a simple IMG tag, or even an entire HTML document. ... PHP scripting provides 10 times the features of both of these ... idea as tokens can eliminate a huge amount of maintance, ...
    (comp.databases.pick)
  • Re: query string passing woes........ help... please....
    ... |> | offer any help other than saying that my validation could be FAR more ... I'm a total newbie at php. ... The easiest way for you would be to make the html form called form.php ... $_SESSION array using the same names. ...
    (alt.php)
  • Re: HELP - Cant change Include Path
    ... Here is my php.ini path for the php.ini in both php and sql dirs: ... which did work on the remote linux server and sent me some mail ... Although my gmail acct picked the mail up as ... an attachment instead of as html - but gmail is really wierd about ...
    (comp.lang.php)
  • Re: How do we get there from here?
    ... server-side-scripted html. ... This is a simple example with very little php scripting. ... means that the version of the php pre-processor on your web server must ... >>> The browser never sees anything not sent to it by the script. ...
    (comp.databases.pick)
  • Re: PHP-Yes, HTML-No --- Why?
    ... Because the files, when downloaded, are called .php and have absolutely no php in them:) ... But the extension doesn't match the contents of the file. ... Surely a dynamic web server should appear exactly the same as a static one - all files that contain HTML when viewed should be called .html. ...
    (comp.lang.php)