A chord's name is determined by it's root note. Like for a B major chord, you would have (please know I'm running over to the piano to check this...) a B, D#, F# . An inversion of this chord would place the F# at the bottom, making it F#,B,D#, and one more inversion would be D#, F#, B.
How do you label chords?
Chords are often labeled according to their function within a key. One system for doing so uses Roman numerals to designate the scale degree of the chord's root. Some musicians also use Roman numerals to describe the quality of the chord. Capital Roman numerals (I, II, III, etc.)
Do all chords have names?
All chords have the major scale (Ionian mode) as their starting point. They are based on the root note of that scale, giving the chord name, e.g. C maj. has C as a base (and usually) bass note. A basic chord will then follow notes 3 and 5 of that scale.