diff --git a/Text/Highlighting/Kate/Format/HTML.hs b/Text/Highlighting/Kate/Format/HTML.hs
--- a/Text/Highlighting/Kate/Format/HTML.hs
+++ b/Text/Highlighting/Kate/Format/HTML.hs
@@ -72,12 +72,12 @@
 
 -- | Format tokens as an HTML @pre@ block. If line numbering is
 -- selected, this is put into a table row with line numbers in the
--- left cell.
+-- left cell and the table is wrapped in a @pre@ block.
 formatHtmlBlock :: FormatOptions -> [SourceLine] -> Html
 formatHtmlBlock opts ls = container ! A.class_ (toValue $ unwords classes)
   where  container = if numberLines opts
-                        then H.table $ H.tr ! A.class_ sourceCode
-                                     $ nums >> source
+                        then H.pre $ H.table $ H.tr ! A.class_ sourceCode
+                                             $ nums >> source
                         else pre
          sourceCode = toValue "sourceCode"
          classes = "sourceCode" :
diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,21 @@
+highlighting-kate 0.5.13 (27 Mar 2015)
+
+  * Wrap HTML table with line numbers in a pre element (Adam Sapek).
+    HTML tables are impossible to format via styles for different
+    screen widths. This means that pandoc generated pages with code
+    blocks must have a fixed minimal width, making them hard to read on
+    narrower screens.
+
+    Wrapping the table in a pre block allows formating of code
+    blocks to have a horizontal scroll bar if the content doesn't fit
+    the screen width, by adding the following style:
+
+         pre.sourceCode {
+             overflow-x: auto;
+         }
+
+    This enables pandoc to generate responsive HTML pages.
+
 highlighting-kate 0.5.12 (19 Mar 2015)
 
   * Added Data and Typeable instances for types used in pandoc's
diff --git a/highlighting-kate.cabal b/highlighting-kate.cabal
--- a/highlighting-kate.cabal
+++ b/highlighting-kate.cabal
@@ -1,5 +1,5 @@
 Name:                highlighting-kate
-Version:             0.5.12
+Version:             0.5.13
 Cabal-Version:       >= 1.10
 Build-Type:          Simple
 Category:            Text
