I don't think 5 years is really a big gap.
10 potentially isn't either depending on your ages.
I'm 33 and I'd say that I look to date around ages 25-36. So up to 8 years younger and yet, only 3 older.
But younger than 25 and I probably wouldn't expect it to be anything more than a bit of fun.
My happiest relationship was with someone 4 years younger than me.
I think as long as you click and they are a decent human being, crack on. But 10 years would probably be my limit.
And if you are only early 20s or younger, keep it within a 5 years. There's a lot of maturing even between 18 and 23 tbh.
And I would strongly, strongly discourage any woman before maybe...24ish, from dating a much older man as many men who go for younger women are predatorial and when you are still young and don't have much relationship exp, you're more likely to miss the signs.
So basically, age 18-23, date within that range. 24+ crack on with whoever takes your fancy. But just make sure you keep up to date with how to spot abusers ect. Never stop refreshing your knowledge on the subject throughout life.