diff --git a/Libraries/LibWeb/HTML/DOMParser.cpp b/Libraries/LibWeb/HTML/DOMParser.cpp
index b1664fc4866..27bb8e6520b 100644
--- a/Libraries/LibWeb/HTML/DOMParser.cpp
+++ b/Libraries/LibWeb/HTML/DOMParser.cpp
@@ -49,6 +49,8 @@ GC::Ref DOMParser::parse_from_string(StringView string, Bindings:
if (type == Bindings::DOMParserSupportedType::Text_Html) {
// -> "text/html"
document = HTML::HTMLDocument::create(realm(), associated_document.url());
+ document->set_content_type(Bindings::idl_enum_to_string(type));
+ document->set_document_type(DOM::Document::Type::HTML);
// 1. Parse HTML from a string given document and compliantString. FIXME: Use compliantString.
document->parse_html_from_a_string(string);
diff --git a/Tests/LibWeb/Text/expected/wpt-import/domparsing/DOMParser-parseFromString-html.txt b/Tests/LibWeb/Text/expected/wpt-import/domparsing/DOMParser-parseFromString-html.txt
new file mode 100644
index 00000000000..a3d5be7ecaa
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/domparsing/DOMParser-parseFromString-html.txt
@@ -0,0 +1,15 @@
+Harness status: OK
+
+Found 10 tests
+
+10 Pass
+Pass Parsing of id attribute
+Pass contentType
+Pass compatMode
+Pass compatMode for a proper DOCTYPE
+Pass Location value
+Pass DOMParser parses HTML tag soup with no problems
+Pass DOMParser should handle the content of as raw text
+Pass DOMParser throws on an invalid enum value
+Pass script is found synchronously even when there is a css import
+Pass must be parsed with scripting disabled, so noscript works
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/wpt-import/domparsing/DOMParser-parseFromString-html.html b/Tests/LibWeb/Text/input/wpt-import/domparsing/DOMParser-parseFromString-html.html
new file mode 100644
index 00000000000..1dd263c39f1
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/domparsing/DOMParser-parseFromString-html.html
@@ -0,0 +1,86 @@
+
+DOMParser basic test of HTML parsing
+
+
+