Yes, you still need to address your letter properly even though your desk might be right across the hall from HR. Using the block format, your address (home address), should be written at the top left corner of the page, with the date written two lines below.
Also remember to address the person in charge of the HR department by their full name and designation.
For more on information on the basic letter writing format, click here:
State the position you are resigning from
In stating your purpose for writing, you should be sure to state the precise position you are resigning form, as stated in your appointment letter. This is important because if you state the position wrongly, you will have failed to resign technically, and legally.
State your reason for resigning
There’s no real reason why you must state the reason for your resignation but it is considered good practice to do so. Your employer (soon to be former) will appreciate knowing the reason why you left, as it will help them prevent such departures in the future.
State the amount of time you intend to stay
Most employment contracts will stipulate a certain number of weeks, usually 4-8 weeks as being the minimum amount of time an employee must stay, after serving their notice of resignation. In practice however, such clauses are hardly ever followed up on and most people stay for about two weeks period before leaving.
You should do your best to avoid burning bridges with your soon to be ex-employer, regardless of how you feel about them, as you might very well be needing a reference from them, or you may even decide to return there for some reason.
In your letter, be as polite as possible and express a commitment to helping the organization, and your successor, through the transition.