doomed_user doomed_user - 1 month ago 7
HTML Question

Is it good practice to insert blank lines into HTML code?

For example, to break up code into chunks for readability/maintainability, or is there a better method?
e.g:

<div class="list">
<p class="list-item">Lorem ipsum</p>
<p class="list-author">Jane Doe</p>

<p class="list-item">Another lorem ipsum</p>
<p class="list-author">John doe</p>
</div>

Answer

I don't see any problems with using blank lines here to increase the readability/maintainability of your code. Another option is to use comments but be careful with HTML comments and do not put sensitive data/information in your comments.

Comments