$attr is added to specify html attributes