An electronic device comprising: a first housing comprising a first plate having a first surface and a second surface facing away from the first surface, and a first side frame forming a first space and at least partially surrounding the first plate; and a second housing comprising a second plate comprising a third surface facing a same direction as the first surface and a fourth surface facing away from the third surface, and a second side frame forming a second space and at least partially surrounding the second plate, wherein at least a portion of the first side frame of the first housing is coupled to at least a portion of the second side frame to be slidable in a first direction, and the first housing movable between a slide-out state and a slide-in state relative to the second housing; a flexible display comprising: a first portion extending across at least a portion of the third surface; and a second portion extending from the first portion and located in the first space in the slide-in state of the first housing, wherein, when the first housing is switched from the slide-in state to the slide-out state, at least a portion of the second portion is exposed to an outside so as to form a substantially same plane as the first portion the electronic device being characterized in that it further comprises a clearance compensation structure (300, 400, 500, 600) disposed in the second space and configured to at least partially cover a clearance space generated between the second side frame and the flexible display when the first housing is switched from the slide-in state to the slide-out state, wherein the clearance compensation structure (300, 400, 500, 600) comprises: a guide block (410, 610) disposed to be movable between the second space and the clearance space; and an elastic member configured to press the guide block (410, 610) toward a third direction, and wherein, in the slide-out state, the guide block (410, 610) is moved to the clearance space by being pressed by the elastic member. a first housing comprising a first plate having a first surface and a second surface facing away from the first surface, and a first side frame forming a first space and at least partially surrounding the first plate; and a second housing comprising a second plate comprising a third surface facing a same direction as the first surface and a fourth surface facing away from the third surface, and a second side frame forming a second space and at least partially surrounding the second plate, wherein at least a portion of the first side frame of the first housing is coupled to at least a portion of the second side frame to be slidable in a first direction, and the first housing movable between a slide-out state and a slide-in state relative to the second housing; a flexible display comprising: a first portion extending across at least a portion of the third surface; and a second portion extending from the first portion and located in the first space in the slide-in state of the first housing, a first portion extending across at least a portion of the third surface; and a second portion extending from the first portion and located in the first space in the slide-in state of the first housing, wherein, when the first housing is switched from the slide-in state to the slide-out state, at least a portion of the second portion is exposed to an outside so as to form a substantially same plane as the first portion the electronic device being characterized in that it further comprises a clearance compensation structure (300, 400, 500, 600) disposed in the second space and configured to at least partially cover a clearance space generated between the second side frame and the flexible display when the first housing is switched from the slide-in state to the slide-out state, wherein the clearance compensation structure (300, 400, 500, 600) comprises: a guide block (410, 610) disposed to be movable between the second space and the clearance space; and an elastic member configured to press the guide block (410, 610) toward a third direction, and wherein, in the slide-out state, the guide block (410, 610) is moved to the clearance space by being pressed by the elastic member. a guide block (410, 610) disposed to be movable between the second space and the clearance space; and an elastic member configured to press the guide block (410, 610) toward a third direction, and wherein, in the slide-out state, the guide block (410, 610) is moved to the clearance space by being pressed by the elastic member.