add contains attribute to element