Make some of the attributes optional, also support inline javascripts