allow images in div as figures

also fixes html attribute formatting
enhanced attribute class
separate out attribute parser
instance attributes with dict
catch no id