attr(HTMLObject, Attribute, Value) can be used both to read the attribute of an HTML element and to set it. If Value is not a ground term, it will unify with the value of Attribute of the HTML element stored in HTMLObject. If it is a ground term, it will set the value for that said attribute.