We report the band-structure changes near Fermi level for single-walled carbon nanotubes (SWNTs) with diameters down to 1 nm from the study of soft-x-ray absorption and resonant emission spectroscopy. The observed quantum confinement of SWNTs affects both pi and sigma bands and bandgap through the rehybridization of pi and sigma orbitals. The significant changes of electronic structure are proved to be a measure for the mean diameter of the macroscopic amounts of SWNTs. (C) 2008 American Institute of Physics.