Final answer:
The preposition 'on' is the correct answer to fill in the blank in the sentence, indicating that the garden is situated on top of the terrace.
Step-by-step explanation:
The correct answer to the question "They had a beautiful garden _______ the terrace." is A) on. The preposition 'on' is used because it indicates a location above or upon a particular place or position, which in this case is the terrace. When describing the location of a garden that is situated at a higher level or directly atop another structure, 'on' is the appropriate word to use.