diff --git a/Tests/LibWeb/Crash/wpt-import/css/css-values/attr-crash.html b/Tests/LibWeb/Crash/wpt-import/css/css-values/attr-crash.html
new file mode 100644
index 00000000000..b1c429193f8
--- /dev/null
+++ b/Tests/LibWeb/Crash/wpt-import/css/css-values/attr-crash.html
@@ -0,0 +1,18 @@
+
+
CSS Values and Units Test: attr
+
+
+
+
+
+
+ Content
+
+
diff --git a/Tests/LibWeb/Crash/wpt-import/css/css-values/crashtests/chrome-405422528-crash.html b/Tests/LibWeb/Crash/wpt-import/css/css-values/crashtests/chrome-405422528-crash.html
new file mode 100644
index 00000000000..fcf7407b5f7
--- /dev/null
+++ b/Tests/LibWeb/Crash/wpt-import/css/css-values/crashtests/chrome-405422528-crash.html
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-in-slotted-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-in-slotted-ref.html
new file mode 100644
index 00000000000..401641606ac
--- /dev/null
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-in-slotted-ref.html
@@ -0,0 +1,13 @@
+
+CSS Values Test: attr() in pseudo element ::slotted
+
+
+
+
+
+
PASS if green
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-notype-fallback-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-notype-fallback-ref.html
new file mode 100644
index 00000000000..21f7362dbaf
--- /dev/null
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/attr-notype-fallback-ref.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/reference/200-200-green.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/reference/200-200-green.html
new file mode 100644
index 00000000000..f3da3ddb3b8
--- /dev/null
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/reference/200-200-green.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+ CSS Values and Units Test:
+ Viewport units are interpolated correctly (reference rendering)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-color-invalid-cast.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-color-invalid-cast.html
new file mode 100644
index 00000000000..f70c8960130
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-color-invalid-cast.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+ CSS Values and Units Test:
+ Attribute references (colors)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-in-slotted.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-in-slotted.html
new file mode 100644
index 00000000000..e1a85b7023a
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-in-slotted.html
@@ -0,0 +1,16 @@
+
+CSS Values Test: attr() in pseudo element ::slotted
+
+
+
+
+
+
+
+
PASS if green
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-invalid-cast.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-invalid-cast.html
new file mode 100644
index 00000000000..3c2589bc934
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-invalid-cast.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+ CSS Values and Units Test:
+ Attribute references (length)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-valid-zero.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-valid-zero.html
new file mode 100644
index 00000000000..a7c98160b17
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-length-valid-zero.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ CSS Values and Units Test:
+ Attribute references (length)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-notype-fallback.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-notype-fallback.html
new file mode 100644
index 00000000000..f0fd275c2a2
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-values/attr-notype-fallback.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-IACVT.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-IACVT.txt
new file mode 100644
index 00000000000..f7e234a6a6d
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-IACVT.txt
@@ -0,0 +1,6 @@
+Harness status: OK
+
+Found 1 tests
+
+1 Pass
+Pass CSS Values Test: attr() IACVT
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-container-style-query.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-container-style-query.txt
new file mode 100644
index 00000000000..e37133848a3
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-container-style-query.txt
@@ -0,0 +1,6 @@
+Harness status: OK
+
+Found 1 tests
+
+1 Fail
+Fail style query should implement to true
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-cycle.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-cycle.txt
new file mode 100644
index 00000000000..2366e95aff9
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-cycle.txt
@@ -0,0 +1,28 @@
+Harness status: OK
+
+Found 22 tests
+
+2 Pass
+20 Fail
+Fail CSS Values and Units Test: attr
+Fail CSS Values and Units Test: attr 1
+Fail CSS Values and Units Test: attr 2
+Fail CSS Values and Units Test: attr 3
+Fail CSS Values and Units Test: attr 4
+Fail CSS Values and Units Test: attr 5
+Fail CSS Values and Units Test: attr 6
+Fail CSS Values and Units Test: attr 7
+Fail CSS Values and Units Test: attr 8
+Fail CSS Values and Units Test: attr 9
+Fail CSS Values and Units Test: attr 10
+Fail CSS Values and Units Test: attr 11
+Fail CSS Values and Units Test: attr 12
+Pass CSS Values and Units Test: attr 13
+Fail CSS Values and Units Test: attr 14
+Fail CSS Values and Units Test: attr 15
+Fail CSS Values and Units Test: attr 16
+Fail CSS Values and Units Test: attr 17
+Fail CSS Values and Units Test: attr 18
+Pass CSS Values and Units Test: attr 19
+Fail CSS Values and Units Test: attr 20
+Fail CSS Values and Units Test: attr 21
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-invalidation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-invalidation.txt
new file mode 100644
index 00000000000..6f9110cc1d0
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-invalidation.txt
@@ -0,0 +1,6 @@
+Harness status: OK
+
+Found 1 tests
+
+1 Fail
+Fail CSS Values and Units Test: attr() invalidation
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-null-namespace.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-null-namespace.txt
new file mode 100644
index 00000000000..5c25922ec40
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-null-namespace.txt
@@ -0,0 +1,11 @@
+Harness status: OK
+
+Found 5 tests
+
+1 Pass
+4 Fail
+Pass Sanity check
+Fail Attribute in null-namespace is substituted
+Fail Fallback is taken when attribute does not exist in null-namespace
+Fail Attribute in null-namespace is substituted (JS)
+Fail Fallback is taken when attribute does not does exist in null-namespace (JS)
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-security.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-security.txt
new file mode 100644
index 00000000000..85e7aaac2aa
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-security.txt
@@ -0,0 +1,28 @@
+Harness status: Error
+
+Found 22 tests
+
+14 Pass
+8 Fail
+Pass '--x: image-set(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Pass 'background-image: image-set(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Fail 'background-image: image-set("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png"
+Pass '--x: src(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Fail 'background-image: src(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Fail 'background-image: src("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png"
+Pass '--x: src(string("https://does-not-exist.test" attr(data-foo)))' with data-foo="/404.png"
+Pass 'background-image: src(string("https://does-not-exist.test" attr(data-foo)))' with data-foo="/404.png"
+Fail 'background-image: src(string("https://does-not-exist.test/""404.png"))' with data-foo="/404.png"
+Fail '--x: attr(data-foo type())' with data-foo="url(https://does-not-exist.test/404.png)"
+Pass 'background-image: attr(data-foo type())' with data-foo="url(https://does-not-exist.test/404.png)"
+Pass 'background-image: url("https://does-not-exist.test/404.png")' with data-foo="url(https://does-not-exist.test/404.png)"
+Pass '--x: image(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Pass 'background-image: image(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png"
+Fail 'background-image: image("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png"
+Fail 'background-image: url(https://does-not-exist.test/404.png), attr(data-foo type())' with data-foo="linear-gradient(#000000, #ffffff)"
+Fail '--x: image-set(var(--y, attr(data-foo)))' with data-foo="https://does-not-exist.test/404.png"
+Pass 'background-image: image-set(var(--y, attr(data-foo)))' with data-foo="https://does-not-exist.test/404.png"
+Pass '--x: image-set(var(--some-string))' with data-foo="https://does-not-exist.test/404.png"
+Pass 'background-image: image-set(var(--some-string))' with data-foo="https://does-not-exist.test/404.png"
+Pass '--x: image-set(var(--some-string-list))' with data-foo="https://does-not-exist.test/404.png"
+Pass 'background-image: image-set(var(--some-string-list))' with data-foo="https://does-not-exist.test/404.png"
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-universal-selector.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-universal-selector.txt
new file mode 100644
index 00000000000..8c9ebef80a9
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/attr-universal-selector.txt
@@ -0,0 +1,6 @@
+Harness status: OK
+
+Found 1 tests
+
+1 Pass
+Pass CSS Values and Units Test: attr() security limitations in universal selector
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-IACVT.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-IACVT.html
new file mode 100644
index 00000000000..b96aab431df
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-IACVT.html
@@ -0,0 +1,28 @@
+
+CSS Values Test: attr() IACVT
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-container-style-query.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-container-style-query.html
new file mode 100644
index 00000000000..cbb2c1b59bd
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-container-style-query.html
@@ -0,0 +1,21 @@
+
+CSS Values and Units Test: attr() in container style queries
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-cycle.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-cycle.html
new file mode 100644
index 00000000000..f734ba054bb
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-cycle.html
@@ -0,0 +1,124 @@
+
+CSS Values and Units Test: attr
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-invalidation.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-invalidation.html
new file mode 100644
index 00000000000..01cc16baee1
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-invalidation.html
@@ -0,0 +1,27 @@
+
+CSS Values and Units Test: attr() invalidation
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-null-namespace.xhtml b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-null-namespace.xhtml
new file mode 100644
index 00000000000..0050e62e174
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-null-namespace.xhtml
@@ -0,0 +1,76 @@
+
+
+
+ CSS Values: attr() substitution with implicit null namespace
+
+
+
+
+
+
+ Test
+
+
+
+
+
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-security.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-security.html
new file mode 100644
index 00000000000..d3dec981ddc
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-security.html
@@ -0,0 +1,272 @@
+
+CSS Values and Units Test: attr() security limitations
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-universal-selector.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-universal-selector.html
new file mode 100644
index 00000000000..cc100a56a50
--- /dev/null
+++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/attr-universal-selector.html
@@ -0,0 +1,35 @@
+
+CSS Values and Units Test: attr() security limitations in universal selector
+
+
+
+
+
+
+
+
+
+
+
+
+