Changed hasAttribute to getAttribute
Added some style