jdMorgan

msg:937591 | 3:35 am on Dec 28, 2002 (gmt 0) |
pageoneresults, I write code using an indented style - especially when the if-then-elses get nested ten deep. Indentation makes the code structure visually clearer, and aids in finding problems. If I'm hand-coding HTML, I may or may not indent the code; I mostly use indentation for scripting and programming languages, but may revert to it for "tricky" tables or complex layouts in HTML. Publishing to the web, however, is an altogether different matter; Once the code is debugged and tested thoroughly, then every single unnecessary character is mercilessly eliminated (I use an automated tool to do this). This regulary results in files 10% to 25% smaller than before, and that means faster page loads, fewer bills for bandwidth overages, and less stress on the server. Jim
|
choster

msg:937592 | 3:41 am on Dec 28, 2002 (gmt 0) |
I use a "limited indent" style. Blocks are separated by carriage returns, but are only indented to represent nesting of block-level elements. Inline tags always fall inline. This I believe to be a good compromise, allowing for readability without adding excessive weight ("white matter?") to documents (for HTML e-mail, we strip out all carriage returns, tabs, and non-content spaces after the final draft is approved).
|
andreasfriedrich

msg:937593 | 9:11 am on Dec 30, 2002 (gmt 0) |
| Since reformatting all of my clients code and building new sites using my method of formatting, I've seen an overall increase in the ability to secure and obtain pageoneresults. |
| That would really be surprising. I do understand why SEs might favour valid HTML over invalid HTML. But I cannot think of any reason why they would prefer one code formatting style over another since the HTML spec clearly states that whitespace does not matter. Could you explain in more details how you measured that increase? Andreas
|
pageoneresults

msg:937594 | 9:19 am on Dec 30, 2002 (gmt 0) |
Content positioning through the use of css. I've stripped all the tables and have absolutely positioned my divs in a particular order.
|
SmallTime

msg:937595 | 9:53 am on Dec 30, 2002 (gmt 0) |
I am with pageonresults, perhaps a little looser, but I like to keep it compact without loosing too much readability. A big monitor helps for those long lines. I read somewhere that browsers will take up to a 255 character line in one gulp, longer lines speed rendering. Not sure if that is true, but makes more sense then waltzing through the table tags (I hate it when I see a line with just one tr tag).
|
andreasfriedrich

msg:937596 | 9:54 am on Dec 30, 2002 (gmt 0) |
Ok, that I can understand :). I thought code formatting was only about breaking up your code into different lines and indenting those lines, i.e. about the use of whitespace. Andreas
|
brotherhood of LAN

msg:937597 | 10:38 am on Dec 30, 2002 (gmt 0) |
=> Click on "template" :) -includes DOCTYPE,<title>,<meta description>,<generic style sheet reference> all on seperate lines 2 hard returns after <head> <divs> seperated by 2 hard returns <p>'s and </p>'s in same line and sandwiched immediated after <div> I hardly ever use tabs and just use line breaks to seperate the "chunks", mainly <head> and <body> and seperate <divs> I've found PHP great to alter "foreign" information to a more friendly code layout. It's handy for simple things like stripping out another webmasters code formatting "preference" and re-arrange it to your liking. If all info came pre-formatted and in the correct format, how much easier would it be! :)
|
creative craig

msg:937598 | 10:47 am on Dec 30, 2002 (gmt 0) |
I tend to keep it all in one block as well, except for header info and one line break in between tables or div's. Craig
|
|