O-hydroxybenzaldehyde (or salicaldehyde) is a liquid at room temperature where as p-hydroxybenzaldehyde is a solid because the former involves intramolecular hydrogen bonding, while in the latter we have intermolecular hydrogen bonding. This intermolecular H-bonding causes association of molecules in p-hydroxybenzaldehyde while there is no such association in o-hydroxybenzaldehyde. As a result, bonding in p-hydroxybenzaldehyde is stronger than in o-hydroxybenzaldehyde and hence it is a solid while o-hydroxybenzaldehyde is a liquid.