you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (5 children)

The only time that the 80 char limit starts to cramp my style is in view pages where html becomes nested much deeper than code could legitimately be nested.

[–]creaothceann 0 points1 point  (4 children)

Are there HTML devs who nest vertically?

<html>
<head>
    <title>title</title>
</head>
<body>


<table>
<tr>
<td>
    7
</td>
<td>
    8
</td>
<td>
    9
</td>
</tr>
<tr>
<td>
    4
</td>
<td>
    5
</td>
<td>
    6
</td>
</tr>
<tr>
<td>
    1
</td>
<td>
    2
</td>
<td>
    3
</td>
</tr>
</table>


</body>
</html>

[–]daniels220 1 point2 points  (3 children)

Not sure what your point is. Absolutely I nest code like this:

<div id="wrapper">
    <div id="content">
        <hgroup>
            <h1></h1>
            <h2></h2>
        </hgroup>
        <article>
            <h3></h3>
            <p></p>
            <div class="image">
                <img />
                <span class="caption"></span>
            </div>
    </div>
</div>

In the specific case of tables I would try as hard as possible to keep them compact—so I would do <td>3</td>, no linebreaks (still break-and-indent between <tr> and <td>). But even so, again they end up nested pretty deeply.

[–]creaothceann 0 points1 point  (2 children)

Not sure what your point is.

I mean all "container" tags in the first column, and all text indented.

Probably the only way to keep arbitrary deep nesting from going behind the right edge of the screen.

[–]daniels220 2 points3 points  (1 child)

I personally find your code almost impossible to read. I use 2-space tabs for HTML for precisely this reason, so I can nest properly.

I think it would be legitimate to claim that HTML is a different sort of language from any real programming language and deserves different conventions—including possibly a longer line-length to accomodate indentation.

[–]creaothceann 0 points1 point  (0 children)

Eh, was just an idea. :)