Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Indentation style

Reply
Thread Tools

Indentation style

 
 
Adrienne
Guest
Posts: n/a
 
      02-28-2005
Gazing into my crystal ball I observed Gunter Ganscher
<> writing in news85Ud.22954$Tt.9757@fed1read05:

> I am trying to search Google for information about coding standards

with
> regards HTML and indentation, but all I can seem to find is coding
> standards documents for programming languages that happen to be HTML
> files, arguments about tabs versus spaces, and other things totally
> irrelevant to my question. What is the common way of indenting HTML?
> Should it be indented at all?
>
> Gunter


I usually only indent major containers, eg:

<div id="container">
<div id="content">
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<table summary="a table">
<caption>Table</caption>
<tr>
<td>A Cell</td>
</tr>
</table>
</div>
</div>

I also write a lot of server side code, and I indent if conditions,
for/while loops, switch case, etc. In that case indenting makes reading
the code a little easier.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      03-01-2005
It was somewhere outside Barstow when Gunter Ganscher
<> wrote:

>I am trying to search Google for information about coding standards with
>regards HTML and indentation,


HTML really doesn't care about this (*)

So use whatever your personal editor does by default, when you hit
auto-wrap. Anything else is just too annoying to work with. Make the
tab display settings such that you can see it.

Should your editor be broken enough to actually kill something
important in HTML when it wraps, switch to a less-broken editor.


(*) Naturally IE is a little broken here.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove overall indentation preserving reletive indentation Jesse B. Ruby 2 03-27-2010 07:23 PM
Why not adopt "Python Style" indentation for Ruby? Chris Dew Ruby 103 10-11-2008 01:41 AM
Indentation style: public/private/protected/case Kenneth Porter C++ 9 10-24-2007 02:57 PM
How to adopt "Python Style" indentation for Ruby Giles Bowkett Ruby 36 05-30-2007 06:25 PM
Indentation Style Nikolai Weibull Ruby 11 08-11-2003 03:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57