copy the text html
snippet in html

copy the text html

user6787

<a class="cls_copy_pg_action copyAction copy-action-btn" data-value="THIS TEXT WILL BE COPIED"> <i class="far fa-copy"></i> Copy</a>

copy the text html

user923

<script type="text/JavaScript">
//courtesy of BoogieJack.com
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>

copy the text html

user3380

<div class="CopyMeClass" id="CopyMeID">The text to copy to the clipboard.</div>
<div><button onclick="CopyClassText()">Copy The Text</button></div>