This paper discusses tone sandhi in Taiwanese from the perspective of the Optimality Theory. Ident-T-R and *T2/D are ranked the highest among the tonal constraints, ensuring that the rightmost tone has an output correspondence and that no more than one marked element occurs in a local domain. AlignP-R is a central prosodic constraint, which aligns the right edge of a phonological phrase with the right edge of a XP, while the syntax-phonology interface can be further accounted for by the Correspondence Theory.