On my page I have:
<div id='something'></div>
and I want to append this type of 'button' to it using JS:
<a href="/news_events/"><span class="picon-p-add-news"></span>Read more news</a>
I tried to use document.createElement but I'm not sure how to make it not just append it as text. How do I do this ?
appendChild. BTW this is a hyperlink styled as button.spanyou then can append to the anchor before appending the anchor to thediv. Search how to add a class to an element in JavaScript for those details., Its all there. Also check MDN for appendChild - classList etc..