An electronic device comprising: a touch screen display; at least one processor electrically coupled to the touch screen display; and a memory electrically coupled to the at least one processor, wherein the memory is configured to store a first object located in a first view class which allows a second object located in the first object to be scrolled in the touch screen display, and the second object is included in a second view class, and wherein, the memory is further configured to store instruction that, when executed, cause the at least one processor to: display web content rendered in the second object through a display region which is set in the first object, receive a touch input for zooming in to or zooming out of the web content with a first magnification, in response to receiving the touch input, change a size of the second object corresponding to the web content to a size of a virtual region, wherein the size of the virtual region is a maximum size supported in the second object and is irrelevant to the first magnification, zoom in to or zoom out of the web content with the first magnification in the second object having the size of the virtual region, update the display region set in the first object based on a size of the zoomed web content, identify whether the touch input is released; and in response to the touch input being released, re-set the size of the second object having the size of the virtual region based on the size of the zoomed web content. a touch screen display; at least one processor electrically coupled to the touch screen display; and a memory electrically coupled to the at least one processor, wherein the memory is configured to store a first object located in a first view class which allows a second object located in the first object to be scrolled in the touch screen display, and the second object is included in a second view class, and wherein, the memory is further configured to store instruction that, when executed, cause the at least one processor to: display web content rendered in the second object through a display region which is set in the first object, receive a touch input for zooming in to or zooming out of the web content with a first magnification, in response to receiving the touch input, change a size of the second object corresponding to the web content to a size of a virtual region, display web content rendered in the second object through a display region which is set in the first object, receive a touch input for zooming in to or zooming out of the web content with a first magnification, in response to receiving the touch input, change a size of the second object corresponding to the web content to a size of a virtual region, wherein the size of the virtual region is a maximum size supported in the second object and is irrelevant to the first magnification, zoom in to or zoom out of the web content with the first magnification in the second object having the size of the virtual region, update the display region set in the first object based on a size of the zoomed web content, identify whether the touch input is released; and in response to the touch input being released, re-set the size of the second object having the size of the virtual region based on the size of the zoomed web content. zoom in to or zoom out of the web content with the first magnification in the second object having the size of the virtual region, update the display region set in the first object based on a size of the zoomed web content, identify whether the touch input is released; and in response to the touch input being released, re-set the size of the second object having the size of the virtual region based on the size of the zoomed web content.