TimurChic,
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Задачи</title>
</head>
<body>
<ul class="tasks-list" id="tasks">
</ul>
<script>
var list = document.querySelector(".tasks-list");
if (!list.children.length) {
var li = document.createElement("li");
var text = document.createTextNode("Активных задач нет");
li.className = "tasks-list__no-tasks";
li.appendChild(text);
list.appendChild(li);
}
</script>
</body>
</html>