alrosavilla,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<p data-name="gerAftPrep"></p>
<p data-name="presPerf"></p>
<p data-name="negatives"></p>
<script>
let tips = {
gerAftPrep: "they normally put gerunds after prepositions",
presPerf: "brace yourself, it's the Present Perfect",
negatives: "need a special verb before not"
};
function showTips() {
let elements = document.querySelectorAll('p[data-name]');
elements.forEach(function(element) {
let name = element.dataset.name;
if (name in tips) element.textContent = tips[name];
})
}
showTips()
</script>
</body>
</html>