Closed leungi closed 5 years ago
When you include one .html
file into another one, you should make sure this .html
file is only an HTML fragment, otherwise the final HTML document will not be valid, because it will have one <html>
tag nested within another like
<html>
<head> </head>
<body>
Parent HTML file.
<!-- htmltools::includeHTML() below -->
<html>
<head> </head>
<body>
Child HTML file.
</body>
</html>
<!-- included above -->
</body>
</html>
You should only include the portion between <body>
and </body>
of test.html
.
Noted. Thanks @yihui !
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Issue: plot renders in HTML preview pane in RStudio, but when opening the knitted HTML output file, it's not showing.
Below is reprex.
Look forward to advice.
The file
test.html
is in the same directory as the.Rmd
file with the following content: