We realize near-perfect absorption with a metallic grating and dielectric substrate. The simulation results show that such near-perfect absorption results from the cavity mode resonance and surface plasmonic polaritions excitation. The absorption peaks can be tuned by changing the geometric parameters or refractive indices of the surrounding materials. When the refractive index of the superstratum is smaller than that of the substrate, one can attain near-perfect absorption with a single-layer metallic grating. The simulation results also show that the absorption peak can be tuned by increasing the incidence angle.