user50073: Why is it that the code I have posted appears jumbled up but looks normal when inserted between brackets?

user313: 
Format your code in the Arduino IDE (or in whatever code-entry editor you are using). In the Arduino IDE, it's the 'Tools | Autoformat' menu item.
Copy/paste your code into Arduino Stack Exchange's question or answer text-entry box. (If you're trying to show code in a comment, forget about formatting. Comment boxes strip all the indenting and newlines out of it. The best you can do in a comment is enclose it in back-ticks: `` to give it a gray background).
Select the entire block of code and click the '{}' symbol in the text-entry box's header. That will indent your code so the site will recognize it as code and keep its formatting.


50073: <p>Why is it that the code I have posted appears jumbled up but looks normal when inserted between brackets?</p>
 313: <ul>
<li><p>Format your code in the Arduino IDE (or in whatever code-entry editor you are using). In the Arduino IDE, it's the 'Tools | Autoformat' menu item.</p></li>
<li><p>Copy/paste your code into Arduino Stack Exchange's question or answer text-entry box. (If you're trying to show code in a comment, forget about formatting. Comment boxes strip all the indenting and newlines out of it. The best you can do in a comment is enclose it in back-ticks: `` to give it a gray background).</p></li>
<li><p>Select the entire block of code and click the '{}' symbol in the text-entry box's header. That will indent your code so the site will recognize it as code and keep its formatting.</p></li>
</ul>
