Using DOM manipulation methods

Solved
Hello;
for the following HTML script:
We want to select the list item included in the <ol> element that has the attribute class = "trois" using querySelector()
Then, we created a new element x as follows:

how to add this element to the <ul> list after the last item?

1 answer

  1. PS: I found out how to add x at the end of the <ul> list :)
    0
    1. @jordane45Not yet, we want to select the list item included in the <ol> element that has the attribute class = "trois" using querySelector()
      0
    2. Moderator
      @SelOua_2617The selector should look something like this
       ol > li.trois 


      The JavaScript query selector uses the same selectors as CSS.
      0
    3. @jordane45Thank you
      problem solved.
      0