<a class="navigation__link" href="#">1</a>
<a class="navigation__link" href="#">2</a>
<a class="navigation__link" href="#">3</a>
let btn = document.createElement('button');//создаём нашу кнопку
let link = document.getElementsByClassName('.navigation__link');
let textInBtn = document.createTextNode('BUTTON');//создаем текст для кнопки
btn.appendChild(textInBtn);//добавляем текст в кнопку
link.appendChild(btn);
4.5.1. The a element
Content model:
Transparent, but there must be no interactive content or a element descendants.
Interactive content is content that is specifically intended for user interaction.
a (if the href attribute is present), audio (if the controls attribute is present), button, details embed, iframe, img (if the usemap attribute is present), input (if the type attribute is not in the Hidden state), label, select, textarea, video (if the controls attribute is present).
The tabindex attribute can also make any element into interactive content.
const links = document.querySelectorAll('.navigation__link');
links.forEach(link => {
const btn = document.createElement('button');
btn.textContent = "BUTTON";
link.appendChild(btn);
});