Yes, you'll want to create two elements, an input element and an anchor element, in a similar way to which the newDiv was created.
To the input element you will set the name attribute and the onclick event.
To the anchor you will set the href attribute and the onclick event, and append some text created with createTextNode
After which, both the input element and the anchor element can be appended to the div.
Do you want to give it a go, and come back to us when you come across a part that you have trouble understanding?