A toaster comprising: - at least one heating compartment (11, 12), in which the food to be heated (13, 14) is positioned; - at least one heating element, associated with said at least one heating compartment (11, 12) and adapted to heat the food (13, 14) positioned in said at least one heating compartment (11, 12); - at least one detection device (70, 80) for recognising a thickness of said at least one food (13, 14) and generating a corresponding detection signal (DS1, DS2); - a control unit, acting upon said at least one heating element and configured for executing a heating program as a function of said detection signal (DS1, DS2) - at least one positioning structure (50, 51) acting upon said at least one food (13, 14) in order to position the same in said at least one heating compartment (11, 12), wherein said at least one positioning structure (50, 51) comprises a pair of grids (25, 26; 27, 28) respectively acting upon opposite sides of a respective food (13, 14), characterized in that said positioning structure further comprises at least one stem (60, 65) having a first end (60a, 65a) constrained to a respective one of said grids (25, 28) and a second end (60b, 65b) opposite to said first end (60a, 65a), wherein said detection device (70, 80) comprises a sensing element (71, 81) which can be switched between a first and a second operating conditions, said sensing element (71, 81) being in the first operating condition when it is not in contact with the second end (60b, 65b) of said stem (60, 65), said sensing element (71, 81) being switched into the second operating condition when the second end (60b, 65b) of said stem (60, 65) exerts a certain pressure on said sensing element (71, 81), wherein when said sensing element (71, 81) is switched into the second operating condition, said control unit acts upon said at least one heating element in order to execute a main heating program comprising a succession of activations separated by respective deactivations of said at least one heating element. - at least one heating compartment (11, 12), in which the food to be heated (13, 14) is positioned; - at least one heating element, associated with said at least one heating compartment (11, 12) and adapted to heat the food (13, 14) positioned in said at least one heating compartment (11, 12); - at least one detection device (70, 80) for recognising a thickness of said at least one food (13, 14) and generating a corresponding detection signal (DS1, DS2); - a control unit, acting upon said at least one heating element and configured for executing a heating program as a function of said detection signal (DS1, DS2) - at least one positioning structure (50, 51) acting upon said at least one food (13, 14) in order to position the same in said at least one heating compartment (11, 12), wherein said at least one positioning structure (50, 51) comprises a pair of grids (25, 26; 27, 28) respectively acting upon opposite sides of a respective food (13, 14), characterized in that said positioning structure further comprises at least one stem (60, 65) having a first end (60a, 65a) constrained to a respective one of said grids (25, 28) and a second end (60b, 65b) opposite to said first end (60a, 65a), wherein said detection device (70, 80) comprises a sensing element (71, 81) which can be switched between a first and a second operating conditions, said sensing element (71, 81) being in the first operating condition when it is not in contact with the second end (60b, 65b) of said stem (60, 65), said sensing element (71, 81) being switched into the second operating condition when the second end (60b, 65b) of said stem (60, 65) exerts a certain pressure on said sensing element (71, 81), wherein when said sensing element (71, 81) is switched into the second operating condition, said control unit acts upon said at least one heating element in order to execute a main heating program comprising a succession of activations separated by respective deactivations of said at least one heating element.