A first layer is formed over a substrate, a light absorbing layer is
formed over the first layer, and a layer having a light-transmitting
property is formed over the light absorbing layer. The light absorbing
layer is selectively irradiated with a laser beam via the layer having a
light-transmitting property. When the light absorbing layer absorbs
energy of the laser beam, due to emission of gas that is within the light
absorbing layer, or sublimation, evaporation, or the like of the light
absorbing layer, a part of the light absorbing layer and a part of the
layer having a light-transmitting property in contact with the light
absorbing layer are removed. By using the remaining part of the layer
having a light-transmitting property or the remaining part of the light
absorbing layer as a mask and etching the first layer, the first layer
can be processed into a desired shape.