I want to add a button to the right of some text. Both the text were added using JS DOM. I researched a lot, but couldn't place it there. It always goes to the next line. How do I do this?
var text = document.createElement("h4");
var content = document.createTextNode("Insert buttton here:--> ");
text.appendChild(content);
document.body.appendChild(text);
var btn = document.createElement("BUTTON");
btn.textContent = "Place me right of the -->";
document.body.appendChild(btn);
html {
font-size: 29px;
}
<html>
<head></head>
<body>
</body>
</html>
Thanks in advance for your time and consideration.