• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Do you indent your HTML ?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
Crap like that? 'Tis a shame you all think it is for no good reason...

People use <marquee> for "good reasons" too.

Does it affect your, or anyone else's ability to view the page? Nope...

However, it doesn't matter. The point of this thread is code organization, specifically indents.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113

Agreed. But, no website is 100% W3C complient. In the end, if browsers are able to read and output the code properly, it doesn't matter... especially since the standards are always changing.

Now, browser compatibility is a completely different issue that should be looked at by more programmers.

Last time I checked, the webpages I actually have up are 100% HTML compliant.
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
. . . always placing CSS links inside the header, and those sorts of things, I don't, and never will, do it ;)

Ok, I glanced at your html and figured ok, whatever, not great but not awful. Nothing to see here.

... but putting the stylesheet link outside of <head>? WTF? Why would anyone knowingly do that? The fact that other people have paid you for crap like that makes me very optimistic about my own employment future.

I know you are going to laugh, but this is why I love MS's Visual Web Developer. It highlights anything that doesn't pass the standards that are currently selected (e.g., HTML, XHTML,XML)
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: n0cmonkey
Originally posted by: daniel1113

Agreed. But, no website is 100% W3C complient. In the end, if browsers are able to read and output the code properly, it doesn't matter... especially since the standards are always changing.

Now, browser compatibility is a completely different issue that should be looked at by more programmers.

Last time I checked, the webpages I actually have up are 100% HTML compliant.

Good for you... it's too bad you did all that extra work for nothing... other than, of course, being able to say your code is 100% HTML compliant.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: daniel1113
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
Crap like that? 'Tis a shame you all think it is for no good reason...

People use <marquee> for "good reasons" too.

Does it affect your, or anyone else's ability to view the page? Nope...

I thought you were a "stickler"? Would a stickler care only about the final, visible result?

Stickler \Stic"kler\ (st[i^]k"kl[~e]r), n. [See {Stickle}, v. t.]
One who stickles. Specifically:

One who pertinaciously contends for some trifling things,
as a point of etiquette
; an unreasonable, obstinate
contender; as, a stickler for ceremony.

However, it doesn't matter. The point of this thread is code organization, specifically indents.

So no thread is ever allowed to veer off to other related topics? It happens all the time.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113

Agreed. But, no website is 100% W3C complient. In the end, if browsers are able to read and output the code properly, it doesn't matter... especially since the standards are always changing.

Now, browser compatibility is a completely different issue that should be looked at by more programmers.

Last time I checked, the webpages I actually have up are 100% HTML compliant.

Good for you... it's too bad you did all that extra work for nothing... other than, of course, being able to say your code is 100% HTML compliant.

Extra work? Not really, the validator pointed out a couple of stupid mistakes. Standards are a good thing.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
Crap like that? 'Tis a shame you all think it is for no good reason...

People use <marquee> for "good reasons" too.

Does it affect your, or anyone else's ability to view the page? Nope...

I thought you were a "stickler"? Would a stickler care only about the final, visible result?

Stickler \Stic"kler\ (st[i^]k"kl[~e]r), n. [See {Stickle}, v. t.]
One who stickles. Specifically:

One who pertinaciously contends for some trifling things,
as a point of etiquette
; an unreasonable, obstinate
contender; as, a stickler for ceremony.

There's my original point! I knew it was somewhere around here... :p
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
"One who pertinaciously contends for some trifling things, as a point of etiquette; an unreasonable, obstinate contender; as, a stickler for ceremony."

And, as I said in my original post, "I always indent, put certain code in specific order, etc."

Where did I say I always made sure my code passed the W3C validator?

Man... it's a good thing the coders for Google don't post here...

http://validator.w3.org/check?...etect+automatically%29
 

djheater

Lifer
Mar 19, 2001
14,637
2
0
I indent CODE for the most part but not religiously like the old guys I work with...(which pisses them off to no end).

Try to consider the programmer that comes after you..

If it is a tricky section indent, Camel Case, etc...
Try and make it easier for the poor fvck trying to decipher how you thought when you wrote that POS script\page, etc.

A nested FOR loop is an example where indentation is quite necessary.... and appreciated by those who come after.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
"One who pertinaciously contends for some trifling things, as a point of etiquette; an unreasonable, obstinate contender; as, a stickler for ceremony."

And, as I said in my original post, "I always indent, put certain code in specific order, etc."

Where did I say I always made sure my code passed the W3C validator?

Man... it's a good thing the coders for Google don't post here...

http://validator.w3.org/check?...etect+automatically%29

They don't claim to be sticklers. ;)

:)
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: n0cmonkey
Originally posted by: daniel1113
"One who pertinaciously contends for some trifling things, as a point of etiquette; an unreasonable, obstinate contender; as, a stickler for ceremony."

And, as I said in my original post, "I always indent, put certain code in specific order, etc."

Where did I say I always made sure my code passed the W3C validator?

Man... it's a good thing the coders for Google don't post here...

http://validator.w3.org/check?...etect+automatically%29

They don't claim to be sticklers. ;)

:)

Way to miss the point of my post...
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: daniel1113
"One who pertinaciously contends for some trifling things, as a point of etiquette; an unreasonable, obstinate contender; as, a stickler for ceremony."

And, as I said in my original post, "I always indent, put certain code in specific order, etc."

Where did I say I always made sure my code passed the W3C validator?

You said you're a stickler when it comes to writing code. You then gave examples, such as indentation and order. This still implies that you are a stickler when writing html in general, and one of the most common things to, uh, stickle about when doing web development is standards compliance.

Man... it's a good thing the coders for Google don't post here...

http://validator.w3.org/check?...etect+automatically%29

Interesting anecdote, but for that matter, I bet a lot of my website wouldn't validate -- although I make a better effort at being proper than the google people apparently do.
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: BingBongWongFooey
You said you're a stickler when it comes to writing code. You then gave examples, such as indentation and order. This still implies that you are a stickler when writing html in general, and one of the most common things to, uh, stickle about when doing web development is standards compliance.

I will change my original post to say "SOME code" and remove the "etc."

Haha... wow... it only took us 20 posts or so to get down to the real issue, which is the way in which I phrased my "stickler-ness".
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
Originally posted by: BingBongWongFooey
You said you're a stickler when it comes to writing code. You then gave examples, such as indentation and order. This still implies that you are a stickler when writing html in general, and one of the most common things to, uh, stickle about when doing web development is standards compliance.

I will change my original post to say "SOME code" and remove the "etc."

Haha... wow... it only took us 20 posts or so to get down to the real issue, which is the way in which I phrased my "stickler-ness".

You're a stickler about style, not about code. Pretty simple really. ;)
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: daniel1113
I will change my original post to say "SOME code" and remove the "etc."

Haha... wow... it only took us 20 posts or so to get down to the real issue, which is the way in which I phrased my "stickler-ness".

Communication skills. ;)

Also, html is a markup language, not a programming language.

;)
 

djheater

Lifer
Mar 19, 2001
14,637
2
0
Originally posted by: BingBongWongFooey
Originally posted by: daniel1113
I will change my original post to say "SOME code" and remove the "etc."

Haha... wow... it only took us 20 posts or so to get down to the real issue, which is the way in which I phrased my "stickler-ness".

Communication skills. ;)

Also, html is a markup language, not a programming language.

;)

Yes but a good writer should stick to code standards...

The only time it's REALLY necessary is if some other poor sap is going to be touching it when you're done.

If it's a personal or static site, it probably doesn't matter... but if it's production.... stick to the standards...
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: n0cmonkey
Oh. I agree with that too, but it'll never happen. :(

Keep the faith alive! :(
rose.gif
 

ijester

Senior member
Aug 11, 2004
348
1
0
You can afford to ignore standards if you work in some sort of programming vacuum, but adhering strictly to a standard of some sort makes life much much easier when working in any sort of multi-programmer environment, as well as for any programmers that might have to work on the code at a later date.

PS: I am using programmer somewhat loosely here:disgust: