random1 Posted October 19, 2011 Share Posted October 19, 2011 Hey All, I'm trying to get some opinions on source code formatting in HTML (using the TAB character). For example: <html> <head> <title>TITLE</title> </head> <body> <div> <div> <div> test </div> </div> </div> </body> </html> VS <html> <head> <title>TITLE</title> </head> <body> <div> <div> <div> test </div> </div> </div> </body> </html> I already tab indent any of my PHP source files however I haven't for HTML source files. What do you think is the better choice for HTML? Should there be a limit set of how many levels of indent to avoid it getting to hard to follow? Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2011 Share Posted October 19, 2011 I usually only use 2 (spaces) for HTML. You shouldn't really use tabs in PHP either as it's not consistent enough across editors. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.