diff --git a/core/modules/media/css/oembed.formatter.css b/core/modules/media/css/oembed.formatter.css
index caf220e444dd9f701258faa5a95bcb1e17ae0b80..d614238b96a120982df73050cf419fde0833b510 100644
--- a/core/modules/media/css/oembed.formatter.css
+++ b/core/modules/media/css/oembed.formatter.css
@@ -1,3 +1,5 @@
 .media-oembed-content {
   max-width: 100%;
+  border: none;
+  background-color: transparent;
 }
diff --git a/core/modules/media/src/Plugin/Field/FieldFormatter/OEmbedFormatter.php b/core/modules/media/src/Plugin/Field/FieldFormatter/OEmbedFormatter.php
index f682a0a8b9c060121b354f8689c559b900637536..70047c89831638258eb7f50b1d8416541fa796f9 100644
--- a/core/modules/media/src/Plugin/Field/FieldFormatter/OEmbedFormatter.php
+++ b/core/modules/media/src/Plugin/Field/FieldFormatter/OEmbedFormatter.php
@@ -22,7 +22,6 @@
 use Drupal\media\Plugin\media\Source\OEmbedInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
-// cspell:ignore allowtransparency
 /**
  * Plugin implementation of the 'oembed' formatter.
  *
@@ -227,9 +226,7 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
           '#tag' => 'iframe',
           '#attributes' => [
             'src' => $url->toString(),
-            'frameborder' => 0,
             'scrolling' => FALSE,
-            'allowtransparency' => TRUE,
             // External service is not supposed to send something larger
             // than the max width or max height, so those values should be used.
             'width' => $resource->getWidth() ?: $max_width,
diff --git a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
index 8092385cec3e176a9f5fe6c2abf6464dead69072..c5426291dabf31eab80ad38ea71633edffe85f25 100644
--- a/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
+++ b/core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php
@@ -72,6 +72,9 @@ public static function providerRender() {
             'height' => '360',
             'title' => 'Drupal Rap Video - Schipulcon09',
             'loading' => 'lazy',
+            // cSpell:disable-next-line
+            'allowtransparency' => NULL,
+            'frameborder' => NULL,
           ],
         ],
         'self_closing' => TRUE,
diff --git a/core/themes/stable9/css/media/oembed.formatter.css b/core/themes/stable9/css/media/oembed.formatter.css
index caf220e444dd9f701258faa5a95bcb1e17ae0b80..d614238b96a120982df73050cf419fde0833b510 100644
--- a/core/themes/stable9/css/media/oembed.formatter.css
+++ b/core/themes/stable9/css/media/oembed.formatter.css
@@ -1,3 +1,5 @@
 .media-oembed-content {
   max-width: 100%;
+  border: none;
+  background-color: transparent;
 }