What is the basic principle of the magnetic compass?

A
Magnetic materials of the same polarity repel each other and those of opposite polarity attract.
B
The Earth's magnetic lines of force are parallel to the surface of the Earth.
C
Magnetic meridians connect points of equal magnetic variation.
D
The compass needle(s) will, when properly compensated, lie parallel to the isogonic lines of the Earth.
E