I want to call a function which creates divs headings and paragraphs inside my HTML code, I can't make the HTML appear though
Here is my JS function:
const about = () => {
document.getElementById('about').innerHTML = '<div class="about"><h1>About</h1><div><p> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div>';
}
I have tried to do this:
<div class = "about-content" id = 'about'>
</div>
and it doesn't seem to be working.. do I need to call the function somewhere in my code?