The <pre> tag preserves whitespace so you can indent as you wish. G r e a t f o r s t r a n g e f o r m a t t i n g ! function example(){ echo 'Also great for displaying code!'; }