Heat up the oven to 225 degree Celsius.
Peel and slice the potatoes in thin slices.
Peel and cut the onion in thin slides.
Put 1/3 of the potatoes like a layer in the oven form.
Put half of the onion on top of the potatoes.
Sprinkle 1/3 of the salt and pepper on the potatoes.
Sprinkle a thin layer of the cheese on the potatoes.
Put a new layer of 1/3 of the potatoes, add the rest of the onion, some cheese and 1/3 of the salt and pepper on top of the other layer in the oven form.
Make a third layer of the rest of the potatoes, and the salt and pepper.
Pour the cream evenly on the gratin.
And the last part is to sprinkle the last of the cheese evenly on top of the gratin.
Put the gratin in the middle of the oven for 40 minutes.
Take out the gratin and serve it warm.