Add classes to visible and invisible tags