Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
Why the lists that I add appear at the end of the page instead of center?

According to html my lists should appear after the sentence 'I love mozilla' because it's [1]: https://i.stack.imgur.com/J2i0Q.png but it appears at the end of my html. I recently added this code for making that after clicking 'add more' I can add lists. This problem then arised. How should I change my javascript to do that? (Thanks for your effort in advance)

const list = document.querySelector('.xususiyyet')
const addMore = document.querySelector('.addList')
document.body.appendChild(list);
addMore.addEventListener('click', () => {
  const listItem = document.createElement('li');
  const listContent = prompt('What else can be added to my list?');
  listItem.textContent = listContent;
  list.appendChild(listItem);
});
<p>i love mozilla because it's</p>
<ul class="xususiyyet">
  <li>safe</li>
  <li>fast</li>
  <li>reliable</li>
</ul>
<p> and open source browser. Click on <strong class="addList">add more</strong> for adding your reasons.</p>
<img src="images/firefox-logo.png" alt="Firefox logo">

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!