We have studied the atomic and electronic structures of 4Hb-TaS2, which has alternating layers of the 1T and 1H type, at room temperature and 77 K, using a scanning tunneling microscope. Using a layer-by-layer etching technique, we fabricated staircases with alternating layers of the 1T and 1H type. The T-type layers showed the typical √13×√13 charge-density-wave structures, whereas the H-type layers had the triangular atomic structure at both temperatures. The measured tunneling spectra of each layer at 77 K showed entirely different characteristics; the 1H layer remained in the metallic state, whereas the 1T layer showed an insulating behavior with a wide opening of the energy gap at the Fermi level at 77 K.