set html attributes without values code example Example: jquery add attribute without value $('body').attr('data-body','');