ho wto get the last child element of a parent element code example
Example 1: apply css on last child in parent div
.parent > *:last-child {
background-color: red;
}
Example 2: last element id javascript
<div id='print'>
<p id=1>some data</p>
<p id=2>some data</p>
<p id=3>some data</p>
<p id=4>some data</p>
<p id=5>some data</p>
</div>