The IRX-beta relation on subgalactic scales in star-forming galaxies of the Herschel Reference Survey