The emission lines of B, C, O and Fe in tokamak plasma are reported. The spectra are compared with those calculated by the CHIANTI code, which is based on the collisional-radiative models with a large amount of accurate atomic data. General agreement is obtained between the results of experiment and computation. Most of the lines in the spectra are identified, and the relative number density ratios of B, C, O and Fe are determined. It is found that the processes of line formation in our experiment are similar to those in the stellar coronae. The line-averaged electron density of the tokamak plasma is measured by the HCN laser, indicating a good agreement with the theoretical prediction by the density-dependent line ratio of Fe XXI.