Preheat oven to 210°C/ Gas 7.
Peel and chop the onions. Heat the oil in a frying pan and cook them until they start to brown and caramelise. Remove from heat and drain them on some thick kitchen towel.
Butter the tartlet cases. Lightly flour a work-surface and roll the pastry until its pliable. Cut the pastry into 6 squares large enough to line the tartlet cases and provide a lip that rises above the edge of the tartlet cases.
Line the tartlet cases and prick the bottoms with a fork a few times. Place in the fridge for 15 minutes.
Meanwhile beat the eggs, cream and milk together. Add some salt and pepper. Stir in the onions. Cut the ham into fine ribbons. Distribute the egg, cream, milk, onion mixture between the 6 tarts. Distribute the ham across the tartlets.
Place into the oven and cook for 20 minutes. Remove and allow to cool for 3-4 minutes. Turn out of the cases, garnish with sprigs of thyme and serve.
Serve with a fresh salad and crisp white wine.
See more Starter recipes
For top tips on protecting you and your family when preparing raw meat and poultry, visit Food Safety in the Home and view the full Food safety at home video.