Mesoporous bulk or film materials can be prepared by sol-gel method. Pore size and porosity can be controlled by aging and heat treatment or adding modifier. Aging increases the strength of the gel skeleton and reduces the shrinkage rate during drying, which is beneficial to obtaining larger pore size and porosity. The effect of heat treatment is just the opposite. The higher temperature will reduce the pore size and porosity due to the surface tension of the pore wall.