(a) When non-metals react with oxygen, acidic oxides are formed. For example, sulphur on reacting with oxygen form sulphur dioxide. This oxide turns blue litmus solution to red, which shows that it is an acidic oxide.
(b) When metals react with oxygen, basic oxides are formed. For example, sodium on reacting with oxygen form sodium oxide. This oxide turns red litmus solution to blue, which shows that it is a basic oxide.