How do I gain defence experience on Runescape 3?

Solution 1:

To change what experience you can gain, you must access the "Powers" interface.

Press the "Powers" tab (the highlighted one in the picture below). Or, press F4 (this is the default keybind though. You may have changed it in your settings):

enter image description here

A menu will open that will look like this:

enter image description here

Click on the "Melee" tab (if not already)

On the right, there will be a box with options. This determines where you get experience. For example, for my character, I am currently gaining Attack experience.

Solution 2:

the above are not correct

Settings/gameplay/combat/combat xp

enter image description here

Solution 3:

In the newest version (2014), click the powers icon: powers icon

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.