jQuery documentation suggests that if you're making dynamic html, the tags you specify should be self closing: Example: $('<table />')