Concept:
The iodoform test is specific to compounds containing a methyl ketone group (CH₃CO-) or an alcohol that can be oxidized to one.
Formaldehyde (HCHO): Does not have a methyl group attached to the carbonyl carbon.
Acetaldehyde (CH₃CHO): Contains the required methyl group.
Performing the Test:
When reacted with iodine (I₂) in the presence of sodium hydroxide (NaOH):
Acetaldehyde gives a yellow precipitate of iodoform (CHI₃).
CH₃CHO + 3 I₂ + 4 NaOH → CHI₃ ↓ (yellow) + HCOONa + 3 NaI + 3 H₂O
Formaldehyde does not react and gives no precipitate.