It is possible to put custom js code inside Rmarkdown documents.
This blog post is curated from different sources such as:
But mostly, I summarized MDN documentation according to my own needs.
This blog post contains my notes from the great interactive video course Learn CSS Grid for free authored by Per Harald Borgen. Please watch the video courses. They explain CSS Grid in a very easy to understand way.