We have observed extreme ultraviolet (EUV) spectra from terbium (Tb) ions in optically thin and thick plasmas for a comparative study. The experimental spectra are recorded in optically thin, magnetically confined torus plasmas and dense laser-produced plasmas (LPPs). The main feature of the spectra is quasicontinuum emission with a peak around 6.5-6.6 nm, the bandwidth of which is narrower in the torus plasmas than in the LPPs. A comparison between the two types of spectra also suggests strong opacity effects in the LPPs. A comparison with the calculated line strength distributions gives a qualitative interpretation of the observed spectra.