Surrogate models are efficient tools which have been successfully applied in structural reliability analysis, as an attempt to keep the computational costs acceptable. Among the surrogate models available in the literature, Artificial Neural Networks (ANNs) have been attracting research interest for many years. However, the ANNs used in structural reliability analysis are usually the shallow ones, based on an architecture consisting of neurons organized in three layers, the so-called input, hidden and output layers. On the other hand, with the advent of deep learning, ANNs with one input, one output, and several hidden layers, known as deep neural networks, have been increasingly applied in engineering and other areas. Considering that many recent publications have shown advantages of deep over shallow ANNs, the present paper aims at comparing these types of neural networks in the context of structural reliability. By applying shallow and deep ANNs in the solution of four benchmark structural reliability problems from the literature, employing Monte Carlo simulation and adaptive experimental designs, it is shown that, although good results are obtained for both types of ANNs, deep ANNs usually outperform the shallow ones.