diff --git a/R/save_kable.R b/R/save_kable.R
index ed36eef..fe80d8f 100644
--- a/R/save_kable.R
+++ b/R/save_kable.R
@@ -41,14 +41,14 @@
     if (attr(x, "format") == "latex") {
       return(save_kable_latex(x, file, latex_header_includes, keep_tex, density))
 
-    # markdown
+      # markdown
     } else if (attr(x, "format") == "pipe") {
 
       # good file extension: write to file
       if (tools::file_ext(file) %in% c("txt", "md", "markdown", "Rmd")) {
         return(save_kable_markdown(x, file))
 
-      # bad file extension: warning + keep going to html writer
+        # bad file extension: warning + keep going to html writer
       } else {
         warning('`save_kable` can only save markdown tables to files with the following extensions: .txt, .md, .markdown, .Rmd. Since the supplied file name has a different extension, `save_kable` will try to use the HTML writer. This is likely to produce suboptimal results. To save images or other file formats, try supplying a LaTeX or HTML table to `save_kable`.')
       }
@@ -102,7 +102,8 @@
     temp_dir <- sub(pattern = '^[\\\\/]{1,2}',
                     replacement = '',
                     tempfile(pattern = 'lib', tmpdir = '' , fileext = ''))
-    save_HTML(html_result, file = file_temp_html, libdir = temp_dir)
+    save_HTML(html_result, file = file_temp_html, libdir = temp_dir,
+              self_contained = FALSE)
 
     result <- webshot::webshot(file_temp_html, file, ...)
     if (is.null(result)) {
@@ -138,13 +139,15 @@
       temp_dir <- sub(pattern = '^[\\\\/]{1,2}',
                       replacement = '',
                       tempfile(pattern = 'lib', tmpdir = '' , fileext = ''))
-      save_HTML(html_result, file = file, libdir = temp_dir)
+      save_HTML(html_result, file = file, libdir = temp_dir,
+                self_contained = TRUE)
       #remove_html_doc(file)
-      rmarkdown::pandoc_self_contained_html(file, file)
+      self_contained(file, file)
       unlink(file.path(dirname(file), temp_dir), recursive = TRUE)
     } else {
-      # Simply use the htmltools::save_html to write out the files. Dependencies go to the standard lib folder
-      htmltools::save_html(html_result, file = file)
+      # Simply use the htmltools::save_html to write out the files.
+      # Dependencies go to the standard lib folder
+      save_HTML(html_result, file = file, self_contained = FALSE)
     }
   }
 
@@ -153,7 +156,7 @@
 
 # Local version of htmltools::save_html with fix to relative path.
 # See https://github.com/rstudio/htmltools/pull/105
-save_HTML <- function(html, file, background = "white", libdir="lib") {
+save_HTML <- function(html, file, libdir = "lib", self_contained = TRUE) {
   base_file <- basename(file)
   dir <- dirname(file)
   file <- file.path(dir, base_file)
@@ -165,16 +168,37 @@
     dep <- htmltools::makeDependencyRelative(dep, dir, FALSE)
     dep
   })
-  html <- c("<!DOCTYPE html>", "<html>", "<head>",
-            "<meta charset=\"utf-8\" title=\"table output\"/>",
-            sprintf("<style>body{background-color:%s;}</style>",
-                    htmltools::htmlEscape(background)),
-            htmltools::renderDependencies(deps, c("href", "file")),
-            rendered$head, "</head>", "<body>",
-            rendered$html, "</body>", "</html>")
+  html <- c(
+    if (self_contained) "" else "<!DOCTYPE html>",
+    "<html>", "<head>",
+    "<meta charset=\"utf-8\"/>",
+    "<title>table output</title>",
+    htmltools::renderDependencies(deps, c("href", "file")),
+    rendered$head, "</head>", "<body>",
+    rendered$html, "</body>", "</html>")
   writeLines(html, file, useBytes = TRUE)
 }
 
+# Local version of rmarkdown::pandoc_self_contained_html(input, output) to
+# remove the no title bug
+self_contained <- function(input, output) {
+  input <- normalizePath(input)
+  if (!file.exists(output))
+    file.create(output)
+  output <- normalizePath(output)
+  template <- tempfile(fileext = ".html")
+  on.exit(unlink(template), add = TRUE)
+  rmarkdown:::write_utf8("$body$", template)
+  from <- if (rmarkdown::pandoc_available("1.17")) "markdown_strict" else "markdown"
+  rmarkdown::pandoc_convert(
+    input = input, from = from, output = output,
+    options = c("--metadata", 'pagetitle="table output"', "--self-contained",
+                "--template", template))
+  invisible(output)
+}
+
+
+
 remove_html_doc <- function(x){
   out <- paste(readLines(x)[-1], collapse = "\n")
   writeLines(out, x)
