werty911, пример запуска после загрузки страницы строка 10.
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
const setcolort = (classname, filter, backgroundColor) => document.querySelectorAll(`.${classname}`)
.forEach(({textContent, style}) => filter(textContent) && Object.assign(style, {backgroundColor}));
const filter = html => Number(html) > 10;
document.addEventListener("DOMContentLoaded", () => setcolort('ted', filter, '#ff0000'));
</script>
</head>
<body>
<table>
<tr>
<td id="1" class="ted">11</td>
<td id="2" class="ted">2</td>
<td id="3" class="ted">3</td>
<td id="4" class="ted">4</td>
<td id="5" class="ted">5</td>
<td id="6" class="ted">6</td>
<td id="7" class="ted">6</td>
</tr>
</table>
</body>
</html>