The simplest examples of major chords are major triads - defined and demonstrated on a virtual piano on a separate page. Here we show all possible major chords in their multiple inversions and with variable numbers of notes. A formal definition of a major chord would be very complicated to cover all the possibilities, so we omit it hoping that this interactive widget will answer all your questions.
Just pick the root note and the number of notes to include in the chord from the form above the piano keyboard. Then below the keyboard you will see buttons listing all the possible major chords that fit the criteria. You may also extend the range of the virtual piano by clicking the + buttons beside the keyboard.