How can I restore an iPad to factory defaults?
In iPad Settings, go to General, then Reset, then "Erase All Contents and Settings". The next thing you see ( after confirmation) is the welcome screen as if just out of the box.

Also: If shipping it you might want to power off by holding top and bottom buttons until you see the "slide to power off" slider. I recently sold my iPad 2, cleared it to factory settings as described and powered off. Happy new owner received it with charge, ready to configure.