Peel and thinly slice the onions.
Heat the olive oil over a medium heat in a large skillet. Add the onions and cook, stirring occasionally, for around 25 minutes until the onions are very soft and starting to brown.
Add the thyme, fennel seeds and pepper to the onions and stir well. Continue to cook for a further five minutes.
Preheat the oven to 220°C (430°F).
Line a baking tray with parchment. Unroll the puff pastry onto the parchment. Use the tip of a sharp knife to score a border around the pastry, about 1cm (approx. ½ inch) from the edge.
Spread the onion mixture over the pastry, just up to the scored line - leave the border clear. Sprinkle the feta over the onion mixture.
Bake the tart at 220°C (430°F) for 20 minutes until the pastry is risen and the filling is bubbling and golden brown. Remove from the oven and sprinkle over the chopped parsley.
Serve the tart hot or warm.
