M
M
Mark2021-06-29 12:27:16
JavaScript
Mark, 2021-06-29 12:27:16

Why is the HTML code in a string inserted as text in the DOM on node.append()?

There is a line, it contains text and an HTML tag. When appended with node.append() , the HTML tag is added to the DOM as text. How can I achieve the behavior so that HTML tags from a string are embedded in the DOM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-06-29
@MarkLb

header.innerHtml = headerText;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question