Styling with CSS:
ul #allposts li{
height: 50px;
width: 50px;
background-color: yellow;
border: 1px solid yellow;
}
Creating HTML structure:
<ul id = "allposts"></ul>
Adding JavaScript functionality:
var container = document.getElementById('allposts');
var newPost = document.createElement('li');
container.appendChild(newPost);
Despite the code being implemented, the new post does not appear as expected. It was supposed to display a small yellow rectangle, right?
Any suggestions on what might be causing this issue?