What you propose is both pefectly legal and also common practice.
All that you need to be aware of is that (irrespective of when you actually take your holidays), if you've taken more holiday in a 'part year' than you were entitled to on a 'pro rata' basis, you're employer can demand repayment in respect of the excess holiday.
For example, if you get 20 days holiday per year and hand in your notice to terminate your employment 4 weeks on Friday (11 Aug), your holiday entitlement (for the 32 weeks which you will have worked this year) would be 12.3 days.
If the total amount of holiday taken this year (including bank holidays or other holiday dates fixed by your employer) exceeds this, then you'd have to pay for the excess holiday. (In the example I've given, if you'd already had one 5 day week off earlier in the year, plus the week ending 11 August, and the 5 public holidays we've had so far this year), your employer would be entitled to deduct 2.7 days pay from your final pay statement.
Chris