Do you indent your HTML ?

Mo0o

Lifer
Jul 31, 2001
24,227
3
76
a)

<table>
..<tr>
....<td>
....</td>
..</tr>
</table>
(pretend the .'s are not there)

b)
<table>
<tr>
<td>
</td>
</tr>
</table>
 

trilks

Golden Member
Aug 16, 2002
1,117
0
0
They both look the same to me.

In any case, yes I do indent in that situation.
 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
Originally posted by: Mo0o
a)

<table>
..<tr>
....<td>
....</td>
..</tr>
</table>
(pretend the .'s are not there)

b)
<table>
......<tr>
.............<td>
.............</td>
.......</tr>
</table>

 

Mo0o

Lifer
Jul 31, 2001
24,227
3
76
Sorry sorry for some reasons the spaces didn't show up in the post even though it showed up in the window.
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
Dreamweaver - Commands - Auto Format or whatever its called...
Thats my Method of indentation ;)
 

BigFatCow

Diamond Member
Aug 11, 2001
3,373
1
0
When i used to code webpages i always indented, it makes it way easier to go back and change somehting later on.
 

Supermercado

Diamond Member
Jan 18, 2002
5,893
0
76
Yes. Makes it much easier to find things if I make a mistake or want to add/change things later on. I never did it until I started programming and was taught the style guidelines, etc.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Mo0o
Sorry sorry for some reasons the spaces didn't show up in the post even though it showed up in the window.

That's where the attach code button comes in handy, in the proper forum. ;)
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

I never said I was a stickler for the supposed "standards." I'm a stickler when it comes to my own set standards.
 

Mo0o

Lifer
Jul 31, 2001
24,227
3
76
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

NERD BURN
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

I never said I was a stickler for the supposed "standards." I'm a stickler when it comes to my own set standards.

Attitudes like that make standards pretty worthless. Of course, without open standards we wouldn't be here. Now if morons would just pay attention to them... ;)
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: n0cmonkey
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

I never said I was a stickler for the supposed "standards." I'm a stickler when it comes to my own set standards.

Attitudes like that make standards pretty worthless. Of course, without open standards we wouldn't be here. Now if morons would just pay attention to them... ;)

? Find a browser that my site isn't compatible with, and we'll talk.

As for closing img tags, always placing CSS links inside the header, and those sorts of things, I don't, and never will, do it ;)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

I never said I was a stickler for the supposed "standards." I'm a stickler when it comes to my own set standards.

Attitudes like that make standards pretty worthless. Of course, without open standards we wouldn't be here. Now if morons would just pay attention to them... ;)

? Find a browser that my site isn't compatible with, and we'll talk.

As for closing img tags, always placing CSS links inside the header, and those sorts of things, I don't, and never will, do it ;)

Not the point (not that I couldn't :evil: ). Standards are there for a reason.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
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.
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Originally posted by: n0cmonkey
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
Originally posted by: n0cmonkey
Originally posted by: daniel1113
I'm a stickler when it comes to writing code. I always indent, put certain code in specific order, etc.

Check out some of my website (link in sig) and you will see what I mean.

Are you sure you're as much of a stickler as you think?

Line 3, column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with the HTML 4.01 Transitional DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

?

Line 8, column 66: document type does not allow element "LINK" here

...esheet" href="stylesheets/main.css" type="text/css">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
:p

I never said I was a stickler for the supposed "standards." I'm a stickler when it comes to my own set standards.

Attitudes like that make standards pretty worthless. Of course, without open standards we wouldn't be here. Now if morons would just pay attention to them... ;)

? Find a browser that my site isn't compatible with, and we'll talk.

As for closing img tags, always placing CSS links inside the header, and those sorts of things, I don't, and never will, do it ;)

Not the point (not that I couldn't :evil: ). Standards are there for a reason.

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.
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
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.

Crap like that? 'Tis a shame you all think it is for no good reason...