Reputation: 4521
When I knit an R Markdown file with the following code, not all of the HTML is rendered. Any thoughts on what is happening here?
---
title: "html test"
author: "NA"
date: "1/16/2021"
output: html_document
---
<div class="grid-container">
<div class="grid-item grid-item1"> col1 </div>
<div class="grid-item grid-item2"> col2 </div>
<div class="grid-item grid-item3"> col3 </div>
</div>
However, when I put the same code into a HTML
file and open it in a web browser, it renders just fine.
Upvotes: 1
Views: 747
Reputation: 78927
This should work, see: https://bookdown.org/yihui/rmarkdown-cookbook/raw-content.html:
---
title: "html test"
author: "NA"
date: "1/16/2021"
output: html_document
---
```{=html}
<div class="grid-container">
<div class="grid-item grid-item1"> col1 </div>
<div class="grid-item grid-item2"> col2 </div>
<div class="grid-item grid-item3"> col3 </div>
</div>
```
Upvotes: 3