In this paper, novel finite elements that include an arbitrary number of additional nodes on each edge of a quadrilateral element are proposed to achieve compatible connection of neighboring nonmatching meshes in plate and shell analyses. The elements, termed variable-node plate elements, are based on two-dimensional variable-node elements with point interpolation and on the Mindlin-Reissner plate theory. Subsequently the flat shell elements, termed variable-node shell elements, are formulated by further extending the plate elements. To eliminate a transverse shear locking phenomenon, the assumed natural strain method is used for plate and shell analyses. Since the variable-node plate and shell elements allow an arbitrary number of additional nodes and overcome locking problems, they make it possible to connect two nonmatching meshes and to provide accurate solutions in local mesh refinement. In addition, the curvature and strain smoothing methods through smoothed integration are adopted to improve the element performance. Several numerical examples are presented to demonstrate the effectiveness of the elements in terms of the accuracy and efficiency of the analyses.