html: generate anchor events for id attributes