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