The online is teaching the way the V7 chord is most often played - especially in contemporary and pre-intermediate classical music. This chord is easy to learn, as it is a simple pattern around the primary chord (e.g. c chord CEG moves to V7 by putting the top two notes in the five finger position together - FG - and lowering the C to B). This chord is easily played in other keys by using the same finger changes.
By theory, the V7 as GBDF is correct - but much harder to move to. The D is not necesesary for the harmonics in C (but this is hard to explain at beginner level). Essentially, the G is the fifth chord from C (i.e. C-I, D-II, E-III, F-IV, G-V). The fifth chord is very important for the sound of every piece. G chord is made of the skips GBD. If you add another skip on that, you get the 7th - it becomes a V7 chord. Thus, GBDF.
The online is teaching you correctly. Both are correct.