Glenys is right, most letters will naturally follow some kind of standard format. However, it can be very difficult writing a letter of resignation. This is particularly true if you don’t want to offend your boss. A closing statement to say you’ve enjoyed it, had good experiences etc. is a good idea.
As you’re looking for a letter of resignation because you’re moving to a different area, you could include that as the reason why. It’s something you could include in a very short sentence, and it gives your boss the reason so he/she doesn’t have to wonder about why you’re leaving the job.