can i create html elements like <html>,<head><body> by using CreateElement() ?
for example
let ele= document.CreateElement('html') or 'body' or 'head'
NO! Its not possible because you cant add a html to a existing html document.
You want to create tag inside tag to an existing html document. You can't do that. Don't use qualified names (like "html:a") with this method. When called on an HTML document, createElement() converts tagName to lower case before creating the element.