We present an application of time-dependent density-functional theory ͑TDDFT͒ to the study of the optical properties of the Si͑111͒2 ϫ 1 surface from the infrared to the ultraviolet. We have carried out ab initio calculations using different methods, from DFT to Bethe-Salpeter equation ͑BSE͒ and, within TDDFT, we have tested the ability of different kernels to describe the optical features in a wide range of energies. We find good agreement between TDDFT and BSE results, by using in TDDFT a long-range frequency-dependent exchangecorrelation kernel derived from the many-body formalism ͑the MB kernel͒. The agreement between theory and experiment is very good in the whole frequency range studied. Excitonic effects, important in the infrared part of the spectrum, are less pronounced in the visible and UV ranges.