A liquid crystal display device 100 comprises a thin film transistor T, a
source (data) line 26, a color filter 23, a pixel electrode 24 and the
like. After a gate electrode 13, a gate insulating film 16, and a channel
region 18 are formed on the glass substrate 10, a polyimide film 20 is
formed to surround the peripheries of the region for forming the
source/drain regions 22, the color filter 23, the pixel electrode 24, and
the source line 26, respectively. A liquid material is applied to the
regions surrounded with the wall made of the polyimide film 20 and a
thermal treatment is performed to form the element of the color filter
23, the pixel electrode 24 and the like. The polyimide film 20 has a
property of light-shielding and then has a function as a black matrix for
shielding the surroundings of the pixel region.