A triad is constructed of the first, third and fifth notes of the major scale
D major
1. Understand the Theory
A key signature is the sharp signs next to the clef. In this case we have F sharp and C sharp. If you need help here please see the key signatures blog.
The tonic triad is the 1st , 3rd and 5th note of the scale.
When there is no key signature this triad requires an sharp sign in front of the F, but it does not need a C sharp as there is no C in the triad to raise by a semitone.