5. In $\triangle A B C$, it is known that $\lg \operatorname{tg} \frac{A}{2}, \lg \operatorname{tg} \frac{B}{2}$, $\operatorname{lgtg} \frac{C}{2}$ form an arithmetic sequence. Then the range of $\angle B$ is
(A) $0<\angle B \leq \frac{\pi}{6}$
(B) $0<\angle B \leqslant \frac{\pi}{3}$
(C) $\frac{\pi}{3} \leqslant \angle B \leqslant \frac{2 \pi}{3}$
(D) $\frac{2 \pi}{3} \leqslant \angle B<\pi$
5. (B).
$$
\begin{array}{l}
\because \operatorname{lgtg} \frac{A}{2}+\operatorname{lgtg} \frac{C}{2}=2 \operatorname{lgt} \frac{B}{2}, \\
\therefore \operatorname{sg} \cdot \operatorname{tg} \frac{C}{2}=\operatorname{tg}^{2} \frac{B}{2}
\end{array}
$$

In $\triangle A \bar{x}$, we always have
$$
\begin{array}{l}
\operatorname{tg} \frac{A}{2} \operatorname{tg} \frac{B}{2}+\operatorname{tg} \frac{B}{2} \operatorname{tg} \frac{C}{2}+\operatorname{tg} \frac{C}{2} \operatorname{tg} \frac{A}{2}=1, \\
\left(\operatorname{tg} \frac{A}{2}+\operatorname{tg} \frac{C}{2}\right) \operatorname{tg} \frac{B}{2}+\operatorname{tg}^{2} \frac{B}{2}=1, \\
\operatorname{tg} \frac{A}{2}+\operatorname{tg} \frac{C}{2}=\operatorname{ctg} \frac{B}{2}-\operatorname{tg} \frac{B}{2}, \\
\therefore \operatorname{tg} \frac{A}{2} 、 \operatorname{tg} \frac{C}{2} \text { are the roots of the equation } \\
x^{2}-\left(\operatorname{ctg} \frac{B}{2}-\operatorname{tg} \frac{B}{2}\right) x+\operatorname{tg}^{2} \frac{B}{2}=0
\end{array}
$$

Therefore, $\Delta=\left(\operatorname{ctg} \frac{B}{2}-\operatorname{tg} \frac{B}{2}\right)^{2}-4 \operatorname{tg}^{2} \frac{B}{2} \geqslant 0$.

Solving it, we get $\operatorname{tg} \frac{B}{2} \leqslant \frac{\sqrt{3}}{3}, 0<\angle B \leqslant \frac{\pi}{3}$.