Html appending end of an <p> element | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Html appending end of an <p> element

how can i append here: <p> some text "i want to append here" <span background-color:red;></span>"not here"</p> not end of span the begining of span

3rd Jul 2018, 9:51 AM
Eren
Eren - avatar
2 Answers
+ 2
Brains🇳🇬 it works when i use before statement in span
3rd Jul 2018, 10:12 AM
Eren
Eren - avatar
+ 4
js as an, insertBefore() method. p.insertBefore("hello") is the opposite of.. p.append("hello");
3rd Jul 2018, 10:01 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar