certo che si può, quando fai
codice:
if (namel == elemento) { 
document.getElementById(namel).style.color="#800000";
aggiungici un
codice:
document.getElementById(namel).style.backgroundColor="#ffff00";
nota come background-color diventi backgroundColor in javascript