You may know about the
:disabled option for form elements such as buttons, text-fields etc:
submit_tag "Pay", :disabled => true
Did you know, you can pass any boolean expression as a value?
submit_tag "Pay", :disabled => @cart.empty?
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.