diff --git a/MANUAL.txt b/MANUAL.txt
index e46efd256..2c9fdcbe6 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -634,11 +634,14 @@ Options affecting specific writers
     stylesheets at absolute URLs will be downloaded; those at relative URLs
     will be sought relative to the working directory (if the first source
     file is local) or relative to the base URL (if the first source
-    file is remote).  Limitation: resources that are loaded dynamically
-    through JavaScript cannot be incorporated; as a result, `--self-contained`
-    does not work with `--mathjax`, and some advanced features (e.g.
-    zoom or speaker notes) may not work in an offline "self-contained"
-    `reveal.js` slide show.
+    file is remote).  Elements with the attribute
+    `data-external="1"` will be left alone; the documents they
+    link to will not be incorporated in the document.
+    Limitation: resources that are loaded dynamically through
+    JavaScript cannot be incorporated; as a result,
+    `--self-contained` does not work with `--mathjax`, and some
+    advanced features (e.g.  zoom or speaker notes) may not work
+    in an offline "self-contained" `reveal.js` slide show.
 
 `--html-q-tags`
 
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index e6d859421..378b2fe98 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -69,6 +69,8 @@ makeDataURI (mime, raw) =
 
 convertTags :: PandocMonad m => Maybe String -> [Tag String] -> m [Tag String]
 convertTags _ [] = return []
+convertTags sourceURL (t@TagOpen{}:ts)
+  | fromAttrib "data-external" t == "1" = (t:) <$> convertTags sourceURL ts
 convertTags sourceURL (t@(TagOpen tagname as):ts)
   | tagname `elem`
      ["img", "embed", "video", "input", "audio", "source", "track"] = do