diff --git a/HTMLparser.c b/HTMLparser.c
index b1271e6f..e2ae3b11 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -5996,6 +5996,8 @@ htmlParseFile(const char *filename, const char *encoding) {
* htmlHandleOmittedElem:
* @val: int 0 or 1
*
+ * DEPRECATED: Use HTML_PARSE_NOIMPLIED
+ *
* Set and return the previous value for handling HTML omitted tags.
*
* Returns the last value for 0 for no handling, 1 for auto insertion.
diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h
index 952a363f..7be3d2b8 100644
--- a/include/libxml/HTMLparser.h
+++ b/include/libxml/HTMLparser.h
@@ -168,6 +168,7 @@ XMLPUBFUN int
int *inlen, int quoteChar);
XMLPUBFUN int
htmlIsScriptAttribute(const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN int
htmlHandleOmittedElem(int val);
diff --git a/python/generator.py b/python/generator.py
index 42da1568..081a67f2 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -291,6 +291,7 @@ skip_impl = (
deprecated_funcs = {
'htmlDefaultSAXHandlerInit': True,
+ 'htmlHandleOmittedElem': True,
'htmlInitAutoClose': True,
'htmlParseCharRef': True,
'htmlParseElement': True,