Porous TiOB2B films were dip-coated on glass substrate by sol-gel process. Ti(OCB4BHB9B)B4B was used as the titanium source and PEG1000 was used as a template. Surface morphology and UV-Vis transmittance spectra were investigated as the factor of the number of TiOB2B layers. The films containing 1 to 3 TiOB2B layers seem to be quite smooth with very slight roughness. While on the surface of the films containing 4 to 6 TiOB2B layers, particles aggregated on the surface accompanied with the formation of small holes. The adsorption edges of the coated films moved to higher wavelength region with increasing film layers. In the wavelength range from 350 to 450 nm, transmittances of the films declined first and then went up when the films got thicker.