diff --git a/R/add_header_above.R b/R/add_header_above.R
index 72fac20..fc2b805 100644
--- a/R/add_header_above.R
+++ b/R/add_header_above.R
@@ -16,6 +16,8 @@
 #' need to be monospaced (verbatim)
 #' @param escape A T/F value showing whether special characters should be
 #' escaped.
+#' @param line A T/F value to control whether a line will appear underneath the
+#' header
 #'
 #' @examples x <- knitr::kable(head(mtcars), "html")
 #' # Add a row of header with 3 columns on the top of the table. The column
@@ -25,7 +27,7 @@
 #' @export
 add_header_above <- function(kable_input, header = NULL,
                              bold = FALSE, italic = FALSE,
-                             monospace = FALSE, escape = TRUE) {
+                             monospace = FALSE, escape = TRUE,line = TRUE) {
   kable_format <- attr(kable_input, "format")
   if (!kable_format %in% c("html", "latex")) {
     warning("Please specify format in kable. kableExtra can customize either ",
@@ -35,17 +37,17 @@
   }
   if (kable_format == "html") {
     return(htmlTable_add_header_above(kable_input, header,
-                                      bold, italic, monospace, escape))
+                                      bold, italic, monospace, escape,line))
   }
   if (kable_format == "latex") {
     return(pdfTable_add_header_above(kable_input, header,
-                                     bold, italic, monospace, escape))
+                                     bold, italic, monospace, escape,line))
   }
 }
 
 # HTML
 htmlTable_add_header_above <- function(kable_input, header,
-                                       bold, italic, monospace, escape) {
+                                       bold, italic, monospace, escape,line) {
   if (is.null(header)) return(kable_input)
   kable_attrs <- attributes(kable_input)
   kable_xml <- read_kable_as_xml(kable_input)
@@ -66,7 +68,7 @@
   }
 
   new_header_row <- htmlTable_new_header_generator(header,
-                                                   bold, italic, monospace)
+                                                   bold, italic, monospace,line)
   xml_add_child(kable_xml_thead, new_header_row, .where = 0)
   out <- as_kable_xml(kable_xml)
   attributes(out) <- kable_attrs
@@ -89,7 +91,7 @@
   return(data.frame(header = names(header), colspan = header, row.names = NULL))
 }
 
-htmlTable_new_header_generator <- function(header_df, bold, italic, monospace) {
+htmlTable_new_header_generator <- function(header_df, bold, italic, monospace,line) {
   row_style <- paste0(
     ifelse(bold, "font-weight: bold; ", ""),
     ifelse(italic, "font-style: italic; ", ""),
@@ -103,7 +105,8 @@
              'padding-bottom:0; padding-left:3px;padding-right:3px;',
              row_style,
              '" colspan="',
-             x[2], '"><div style="border-bottom: 1px solid #ddd; padding-bottom: 5px;">',
+             x[2], '"><div style="',
+             ifelse(line,'border-bottom: 1px solid #ddd; padding-bottom: 5px;">','">'),
              x[1], '</div></th>')
     }
   })
@@ -114,7 +117,7 @@
 
 # Add an extra header row above the current header in a LaTeX table ------
 pdfTable_add_header_above <- function(kable_input, header,
-                                      bold, italic, monospace, escape) {
+                                      bold, italic, monospace, escape, line) {
   table_info <- magic_mirror(kable_input)
   header <- standardize_header_input(header)
   if (escape) {
@@ -124,7 +127,11 @@
   hline_type <- switch(table_info$booktabs + 1, "\\\\hline", "\\\\toprule")
   new_header_split <- pdfTable_new_header_generator(header, table_info$booktabs,
                                                     bold, italic, monospace)
-  new_header <- paste0(new_header_split[1], "\n", new_header_split[2])
+  if(line){
+    new_header <- paste0(new_header_split[1], "\n", new_header_split[2])
+  } else {
+    new_header <- new_header_split[1]
+  }
   out <- str_replace(enc2utf8(as.character(kable_input)),
                      hline_type,
                      paste0(hline_type, "\n", new_header))
