diff --git a/src/parse/state/tag.js b/src/parse/state/tag.js
index c3fa1a122258..2db102ab0d7d 100644
--- a/src/parse/state/tag.js
+++ b/src/parse/state/tag.js
@@ -47,6 +47,10 @@ export default function tag ( parser ) {
parser.allowWhitespace();
if ( isClosingTag ) {
+ if ( voidElementNames.test( name ) ) {
+ parser.error( `<${name}> is a void element and cannot have children, or a closing tag`, start );
+ }
+
if ( !parser.eat( '>' ) ) parser.error( `Expected '>'` );
const element = parser.current();
diff --git a/test/parser/error-void-closing/error.json b/test/parser/error-void-closing/error.json
new file mode 100644
index 000000000000..8756a518782f
--- /dev/null
+++ b/test/parser/error-void-closing/error.json
@@ -0,0 +1,8 @@
+{
+ "message": " is a void element and cannot have children, or a closing tag",
+ "loc": {
+ "line": 1,
+ "column": 23
+ },
+ "pos": 23
+}
diff --git a/test/parser/error-void-closing/input.html b/test/parser/error-void-closing/input.html
new file mode 100644
index 000000000000..886b019891a3
--- /dev/null
+++ b/test/parser/error-void-closing/input.html
@@ -0,0 +1 @@
+this is illegal!