The pre tag preserves both spaces and line breaks:
My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. oh, bring back my Bonnie to me.