The effect of the top wall temperature on the laminar natural convection in air-filled rectangular cavities driven by a temperature difference across the vertical walls was investigated for three different aspect ratios of 0.5, 1.0, and 2.0. The temperature distributions along the heated vertical wall were measured, and the flow patterns in the cavities were visualized. The experiments were performed for a global Grashof number of approximately 1.8×108 and nondimensional top wall temperatures from 0.52 (insulated) to 1.42. As the top wall was heated, the flow separated from the top wall with an undulating flow region in the corner of the cavity, which resulted in a nonuniformity in the temperature profiles in this region. The location and extent of the undulation in the flow are primarily determined by the top wall temperature and nearly independent of the aspect ratio of the cavity. The local Nusselt number was correlated with the local Rayleigh number for all three cavities in the form of Nu=C⋅Ran, but the values of the constants C and n changed with the aspect ratio.