A heating unit includes an AlN substrate having a main surface on which an elongated heat-generating resistor is provided. A protection layer is formed on the main surface of the substrate for the heat-generating resistor. The protection layer includes a first cover layer covering the heat-generating resistor and a second cover layer covering the first cover layer. The first cover layer is made of crystallized or semi-crystallized glass having a higher crystallization temperature by at least 50° C. than the softening point of the glass. The second cover layer is made of non-crystalline glass.