Which of the following elements is a metalloid?
A. magnesium
B. silicon
C. phosphorus
D. cobalt