Both detection of elements and detection of functional groups in an organic compound work the same way: an otherwise unreactive, covalently bonded atom or group is converted into an ionic or strongly coloured species that a simple test-tube reaction can reveal.
Nitrogen, sulphur and halogens are covalently bound in the intact molecule and give no test directly, so the compound is first fu