Space Out HTML Source Code

It is so much easier to look at your HTML source code if you space out your HTML code, putting each part of the HTML code on a separate line. HTML code errors and page content are much easier to find with HTML coding spaced out.

This HTML source code much easier to read:

  <caption>Caption/Title of the table</caption>
      <th>Column 1 heading</th>
      <th>Column 2 heading</th>
      <th>Column 3 heading</th>
      <td>Column 1 Row 2 content</td>
      <td>Column 2 Row 2 content</td>
      <td>Column 3 Row 2 content</td>

Than this condensed HTML source code:

<table><caption>Caption/Title of the table</caption><tr><th>Column 1 heading</th><th>Column 2 heading</th><th>Column 3 heading</th></tr><tr><td>Column 1 Row 2 content</td><td>Column 2 Row 2 content</td><td>Column 3 Row 2 content</td></tr></table>

The condensed version does reduce the html file size but is very hard to read when looking for HTML code errors and the right spot to insert content.

Benefits of Spacing Out HTML Source Code

There a number of benefits to spacing out HTML source code:

Related Source Code Articles and Tips

If you found this web page a useful resource for your own website please link as follows:

HTML Basic Tutor -

Basic HTML Tips - Space Out HTML Source Code so HTML code errors and page content are much easier to find.