5. In space, there are 5 points, no 4 of which are coplanar. If several line segments are drawn and there is no tetrahedron in the graph, then the graph can have at most ( ) triangles.
(A) 3
(B) 4
(C) 5
(D) 6
5.B.

First, construct Graph 2, which is easily known to meet the conditions and has exactly 4 triangles.

If there exists a situation where the number of triangles is no less than 5, we will prove that this leads to a contradiction.

If only two line segments are not connected, then these two unconnected line segments must have no common intersection point, otherwise, a tetrahedron would exist. Therefore, Graph 2 has only 4 triangles, which is a contradiction.

If at least three line segments are not connected, when one of the line segments serves as a side of 3 triangles, as shown in Graph 3, there are only 3 triangles; when each line segment serves as a side of at most 2 triangles, then there are at most $\left[\frac{\left(C_{5}^{2}-3\right) \times 2}{3}\right]=4$ triangles.