
I would recommend using a class attribute or custom attribute. I often use klass myself.
Well, we can use id and class tags to find and rewrite parts of HTML. But in fact, we can do anything the HTML::Element look_down method can do to find elements.

They are tree processing methods. Seamstress is an open-ended API for OO tree processing. Here are good places to search for methods:
It inherits from HTML::TreeBuilder and HTML::Element and it uses HTML::Element::Library. It probably should use HTML::Element::Replacer as well!