Quello mirrors the definite article: quel = il, quello = lo, quella = la, quell' = l'. If you know which article a noun takes, you know which form of 'quello' to use.
Quello — The Definite Article Connection1 / 10
The article is 'il': il giardino → ___ giardino (that garden)