diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php
index 168b8ace4c394..d6df280f35dca 100644
--- a/src/wp-includes/html-api/class-wp-html-processor.php
+++ b/src/wp-includes/html-api/class-wp-html-processor.php
@@ -4704,7 +4704,7 @@ private function bookmark_token() {
*/
public function get_namespace(): string {
if ( ! isset( $this->current_element ) ) {
- return 'html';
+ return parent::get_namespace();
}
return $this->current_element->token->namespace;