That's interesting. I just checked with Wiki and got this answer:
"petrol in the UK (England, Wales, Scotland, Northern Ireland) - is sold by the litre. This is the case in all European countries."
It’s sold by the litre, but many older Brits, like my bro-in-law, still refer to imperial gallons.