Finding the first generation of galaxies in the early Universe is the greatest step forward towards understanding galaxy formation and evolution. For a strategic survey of such galaxies and the interpretation of the obtained data, this paper presents an ultraviolet-to-optical spectral model of galaxies with a great care of the nebular emission. In particular, we present a machine-readable table of intensities of 119 nebular emission lines from Lyα to the rest-frame 1 m as a function of metallicity from zero to the solar one. Based on the spectral model, we present criteria of equivalent widths of Lyα, He iiλ1640, Hα, Hβ and [O iii]λ5007 to select extremely metal-poor and metal-free galaxies although these criteria have uncertainty caused by the Lyman continuum escape fraction and the star formation duration. We also present criteria of broad-band colours which will be useful to select candidates for spectroscopic follow-up from drop-out galaxies. We propose the line intensity ratio of [O iii]λ5007 to Hβ < 0.1 as the most robust criterion for <1/1000 of the solar metallicity. This ratio of a galaxy with a few M⊙ yr−1 at z∼ 8 is detectable by spectroscopy with the James Webb Space Telescope within a reasonable exposure time.