You have to go into Combat Settings. On the right, you'll see Melee, Ranged, and Magic Combat Experience. Go to Melee and switch attack to defense.