Every major key contains 7 diatonic triads: I, IV, V are major; ii, iii, vi are minor; vii is diminished
Building triads on each of the 7 scale degrees of a major scale, staying strictly within the scale, always produces the same pattern of chord qualities: I major, ii minor, iii minor, IV major, V major, vi minor, vii diminished. This is true regardless of which major key you are in. Roman numerals with capital letters = major; lowercase = minor. These 7 chords, together with their relationships, underpin the vast majority of Western popular music. The three-chord trick (I, IV, V) is the most fundamental subset.
Examples
C major: I=C, ii=Dm, iii=Em, IV=F, V=G, vi=Am, vii=B dim. G major: I=G, ii=Am, iii=Bm, IV=C, V=D, vi=Em, vii=F# dim.
Assessment
Write the 7 diatonic triads of the key of D major. Identify which are major, which are minor, which is diminished.