This paper describes a structural mechanics approach to modelling the mechanical properties of carbon nanotubes (CNTs). Based on a model of truss structures linked by inter-atomic potentials, a closed-form elastic solution is obtained to predict the mechanical properties of single-walled carbon nanotubes (SWNTs). Moreover, the elastic modulus of multi-walled carbon nanotubes (MWNTs) is also predicted for a group of the above mentioned SWNTs with uniform interval spacing. Following the structural mechanics approach, the elastic modulus, Poisson's ratio, and the deformation behaviors of SWNTs were investigated as a function of the nanotube size and structure. Poisson's ratio of SWNTs shows a chirality dependence, while the elastic modulus is insensitive to the chirality. The disposition of the strain energy of bonds shows quite a difference between the zigzag and armchair tubes subjected to axial loading. A zigzag tube is predicted to have a lower elongation property than an armchair tube.