0
I wanted to know how to do so so that instead of appearing that sentence appears ul when clicking the button, what I should use in createTextNode for this to happen.
function mais() {
var x = document.createElement("li");
var t = document.createTextNode("This is a paragraph.");
x.appendChild(t);
document.body.appendChild(x);
}
<div class="emcima">
<div class='A'>
<h1>Tarefas</h1>
<button type="button" onclick="mais()" class="btn-mais" >Adicionar</button>
</div>
<div class='espaco'>
<ul class="tarefas">
<li class="tarefa">
<header>
<input type="text" class="titulo" placeholder="Título">
<button type="button" onclick="enable()" class="btn-escrever">✒️</button>
<button type="button" class="btn-apagar">✂️</button>
</header>
<textarea name="" placeholder="Texto da tarefa" class='texto'></textarea>
</li>
</ul>
</div>
</div>