My heading is display After my unordered list item Link. I want to display heading first and second i want to do the unordered l | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

My heading is display After my unordered list item Link. I want to display heading first and second i want to do the unordered l

Display heading first and do unordered list item Link. https://code.sololearn.com/WYFgYSvy1LIu/?ref=app

24th Feb 2021, 6:34 AM
Malick Diagne
Malick Diagne - avatar
1 Answer
+ 1
You are doing appendChild on body which always insert at last.. Try using insertBefore.. Like document.body.insertBefore(heading,ul) This will work for you..
24th Feb 2021, 6:43 AM
Rei Ōgami
Rei Ōgami - avatar