Format an attribute