Abstract: A faucet includes a mounting unit and a valve unit. The mounting unit includes a fixed seat and a rotatable seat rotatable relative to the fixed seat. The fixed seat is formed with a plurality of inverted L-shaped retaining hooks. The valve unit includes a housing, a coupling member disposed in the housing, a valve seat, an electromagnetic valve, and an infrared sensor. The coupling member includes a plurality of L-shaped retaining grooves engaging respectively the retaining hooks. The retaining hooks can be removed from the retaining grooves to allow for maintenance and replacement of the valve unit.