A reliable detection of optically detecting the type of recording media is
achieved. A part of a support member for supporting an optical sensor is
pushed against the surface of a sheet by a spring so as to maintain the
gap between the sensor and the sheet surface. With this arrangement, a
recording apparatus which is free from wrong detection is achieved
regardless of a gap-varying factor, that is, the remaining amount of
sheets. Also, by arranging a part of a light-shielding hood so as to abut
against the sheet, wrong detection due to disturbance light can be
prevented.