Your very first sentence should establish your intent. Generally letters of resignation are worded "Please accept the resignation of my position of_______, effective _______." Make sure to give the date your resignation will be effective from and list your position. Sometimes those in charge of human resources are not the same people who work with you every day, and they might not know what position you had.
Next, make sure that the notice you are giving is commiserate with company requirements. The standard notice is at least two weeks. Some companies require a month's notice or more depending on how difficult your position is to fill. Remember that by following proper ettiquete when putting in your resignation, you can maintain the opportunity for a recommendation letter in the future.
Finally, especially if you have a niche position, you should offer to aid in the training and orientation of the person who will be replacing you.