var text = '<div>тест</div>'; var div = document.createElement('div'); div.innerHTML = text; var result = div.firstChild; alert(result);