I need to create a tag dynamically with javascript.
var br = document.createElement(\'br\');
And
The first method does not need to pass XHTML standards - you're confusing markup with manipulating the DOM.