How do I right align

Hey folks, how do I right align only the timestamp since p.style will style the whole p tag. How do I target only the timestamp?

 mail.append(p)
 p.innerHTML = `<strong> ${emails[i].sender}  </strong> ${emails[i].subject} ${emails[i].timestamp}`

you need to wrap it in its own element, and target that element

if it’s already a separated element you can give that element a class

1 Like