You shouldn't have tags that the browser won't understand.
Instead of the browser "encountering" such a tag, it would be best to create this div you want when the page has finished loading, like this:
Code:
window.onload = function() {
var d = document.createElement('div');
d.style.width = '300px';
d.style.backgroundColor = '#A090FF';
d.appendChild(document.createTextNode('The text you want in the div'));
document.body.appendChild(d);
}
That will put this new div at the end of your document, but you can put it wherever you want using appendChild or insertBefore.
It's unclear what you mean by the browser "encountering" this tag. What do you mean?
Bookmarks