[wp-hackers] Outputting Clean Well Indented and Readable X/HTML
Craig Russell
craig at craig-russell.co.uk
Mon Mar 14 16:57:55 UTC 2011
You should aim for to minimise the size of files being downloaded.
Think of all the extra bytes you'll save not having to faff around
adding spaces and tabs in to your source.
Keep your code readable on the server, but keep it fast on the client.
-Craig
On 14 March 2011 16:51, Kevin Newman <CaptainN at unfocus.com> wrote:
> Personally, I don't concern myself with clean output, and prefer it be as
> small and tight as possible for reduced payload size.
>
> Every major browser now comes with tools (or have them available) that show
> you a live collapsible view of the HTML - very rarely do I ever need to look
> and see what the raw html looks like since I spend my time looking at these
> tools - even then though, you can get the HTML of a selection pretty easily,
> which reduces the amount of HTML you need to sift through enough that it can
> be pretty messy, and you'll do fine.
>
> The thought of going back 5 years to a time when firebug didn't exist, is
> enough to give me nightmares.
>
> Kevin N.
>
>
> On 3/7/11 3:34 PM, Alex Andrews wrote:
>>
>> Dear all,
>>
>> Looking at the raw HTML for a site I'm working for, its really
>> horribly formatted. There is just so much unnecessary whitespace and
>> bad indenting. It makes it very difficult to work out what is going
>> on, and occasionally what is going wrong.
>>
>> How do other people cope with this? I know there are a few plugins,
>> but they don't seem to format HTML 5 well. HTML Tidy module for PHP is
>> unavailable on my server. How can one:
>>
>> 1. Use plugins to make HTML output from Wordpress look best.
>> 2. Have best practices for programming PHP in Wordpress to solve this
>> problem?
>>
>> Thanks for all your help.
>>
>> All the best.
>>
>> Alex
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list