Flow-induced vibration of an elastic structure such as a flag has drawn attention recently because of its complicated coupling mechanisms and potential application to energy harvesting. For both air and water flows, we experimentally investigate the effect of an upstream bluff body on the dynamics of two types of a downstream flag, a conventional flag and an inverted flag, on and off a midline. In contrast to the conventional flag, the trailing edge of the inverted flag is clamped, and its leading edge is free to move. By using smoke visualization and particle image velocimetry, the interaction of the flag with the vortices shedding from the bluff body was also identified. With the deployment of a bluff body, the conventional flag displays two distinct periodic flapping modes. While synchronization with the vortices shedding from the bluff body and a resultant fundamental mode appear in a low free-stream velocity range for the conventional flag lying on the midline behind the bluff body, the conventional flag off the midline shows a second harmonic mode by flutter instability in a higher free-stream velocity range. Meanwhile, the inverted flag reveals both small-amplitude flapping mode by a lock-in process and large-amplitude flapping mode by divergence stability at a given location on the midline and farther from the bluff body. However, only large-amplitude flapping mode is observed for the inverted flag off the midline. Even though the critical free-stream velocity when the inverted flag starts large-amplitude flapping depends on its relative streamwise and crosswise positions, the flag in flapping mode exhibits similar maximum amplitude and frequency pattern regardless of its relative locations. (C) 2017 Elsevier Ltd. All rights reserved.