WEB-76699 MDN: documentation update February 2025- update test data

GitOrigin-RevId: 9ba25ea7e4259fa47b69c90940e6833bfe2933b7
This commit is contained in:
Piotr Tomiak
2026-02-05 19:08:04 +00:00
committed by intellij-monorepo-bot
parent 806af113c9
commit 798fd886f8
5 changed files with 5 additions and 4 deletions
@@ -7,6 +7,7 @@
<p class='grayed'>Baseline since 2015
</details>
The <strong><code>&lt;svg&gt;</code></strong> <a href="https://developer.mozilla.org/en-us/docs/Web/SVG">SVG</a> element is a container that defines a new coordinate system and <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Attribute/viewBox">viewport</a>. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document.
<p>This element is for creating <em>new</em> SVG documents. If you have an existing SVG document to embed in another document via URL, use <a href="https://developer.mozilla.org/en-us/docs/Web/HTML/Reference/Elements/img"><code>&lt;img&gt;</code></a>, <a href="https://developer.mozilla.org/en-us/docs/Web/HTML/Reference/Elements/object"><code>&lt;object&gt;</code></a>, or <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/image"><code>&lt;image&gt;</code></a>.
<div class="notecard note">
<p><strong>Note:</strong>
The <code>xmlns</code> attribute is only required on the outermost <code>svg</code> element of <em>SVG documents</em>, or inside HTML documents with XML serialization. It is unnecessary for inner <code>svg</code> elements or inside HTML documents with HTML serialization.
@@ -8,7 +8,7 @@
</details>
The <strong><code>&lt;image&gt;</code></strong> <a href="https://developer.mozilla.org/en-us/docs/Web/SVG">SVG</a> element includes images inside SVG documents. It can display <a href="https://developer.mozilla.org/en-us/docs/Glossary/Raster_image">raster image</a> files or other SVG files.
<p>The only image formats SVG software must support are <a href="https://developer.mozilla.org/en-us/docs/Glossary/JPEG">JPEG</a>, <a href="https://developer.mozilla.org/en-us/docs/Glossary/PNG">PNG</a>, and other SVG files. Animated <a href="https://developer.mozilla.org/en-us/docs/Glossary/GIF">GIF</a> behavior is undefined.
<p>SVG files displayed with <code>&lt;image&gt;</code> are <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Guides/SVG_as_an_image">treated as an image</a>: external resources aren't loaded, <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/:visited"><code>:visited</code></a> styles <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/CSS_selectors/Privacy_and_the_visited_selector">aren't applied</a>, and they cannot be interactive. To include dynamic SVG elements, try <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/use"><code>&lt;use&gt;</code></a> with an external URL. To include SVG files and run scripts inside them, try <a href="https://developer.mozilla.org/en-us/docs/Web/HTML/Reference/Elements/object"><code>&lt;object&gt;</code></a> inside of <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/foreignObject"><code>&lt;foreignObject&gt;</code></a>.
<p>SVG files displayed with <code>&lt;image&gt;</code> are <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Guides/SVG_as_an_image">treated as an image</a>: external resources aren't loaded, <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/Reference/Selectors/:visited"><code>:visited</code></a> styles <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/Guides/Selectors/Privacy_and_:visited">aren't applied</a>, and they cannot be interactive. To include dynamic SVG elements, try <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/use"><code>&lt;use&gt;</code></a> with an external URL. To include SVG files and run scripts inside them, try <a href="https://developer.mozilla.org/en-us/docs/Web/HTML/Reference/Elements/object"><code>&lt;object&gt;</code></a> inside of <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/foreignObject"><code>&lt;foreignObject&gt;</code></a>.
<div class="notecard note">
<p><strong>Note:</strong>
The HTML spec defines <code>&lt;image&gt;</code> as a synonym for <a href="https://developer.mozilla.org/en-us/docs/Web/HTML/Reference/Elements/img"><code>&lt;img&gt;</code></a> while parsing HTML. This specific element and its behavior only apply inside SVG documents or inline SVGs.
@@ -9,7 +9,7 @@
The <strong><code>stroke-width</code></strong> attribute is a presentation attribute defining the width of the stroke to be applied to the shape. It applies to any SVG shape or text-content element, but as an inherited property, it may be applied to elements such as <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/g"><code>&lt;g&gt;</code></a> and still have the intended effect on descendant elements' strokes.
<div class="notecard note">
<p><strong>Note:</strong>
As a presentation attribute, <code>stroke-width</code> also has a CSS property counterpart: <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/stroke-width"><code>stroke-width</code></a>. When both are specified, the CSS property takes priority.
As a presentation attribute, <code>stroke-width</code> also has a CSS property counterpart: <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/Reference/Properties/stroke-width"><code>stroke-width</code></a>. When both are specified, the CSS property takes priority.
</div>
<p>You can use this attribute with the following SVG elements:
<ul>
@@ -9,7 +9,7 @@
The <strong><code>stroke-width</code></strong> attribute is a presentation attribute defining the width of the stroke to be applied to the shape. It applies to any SVG shape or text-content element, but as an inherited property, it may be applied to elements such as <a href="https://developer.mozilla.org/en-us/docs/Web/SVG/Reference/Element/g"><code>&lt;g&gt;</code></a> and still have the intended effect on descendant elements' strokes.
<div class="notecard note">
<p><strong>Note:</strong>
As a presentation attribute, <code>stroke-width</code> also has a CSS property counterpart: <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/stroke-width"><code>stroke-width</code></a>. When both are specified, the CSS property takes priority.
As a presentation attribute, <code>stroke-width</code> also has a CSS property counterpart: <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/Reference/Properties/stroke-width"><code>stroke-width</code></a>. When both are specified, the CSS property takes priority.
</div>
<p>You can use this attribute with the following SVG elements:
<ul>
@@ -9,6 +9,6 @@
Turns a <code>&lt;button&gt;</code> element into a popover control button; takes the ID of the popover element to control as its value. Establishing a relationship between a popover and its invoker button using the <code>popovertarget</code> attribute has two additional useful effects:
<ul>
<li>The browser creates an implicit <a href="https://developer.mozilla.org/en-us/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-details"><code>aria-details</code></a> and <a href="https://developer.mozilla.org/en-us/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-expanded"><code>aria-expanded</code></a> relationship between popover and invoker, and places the popover in a logical position in the keyboard focus navigation order when shown. This makes the popover more accessible to keyboard and assistive technology (AT) users (see also <a href="https://developer.mozilla.org/en-us/docs/Web/API/Popover_API/Using#popover_accessibility_features">Popover accessibility features</a>).</li>
<li>The browser creates an implicit anchor reference between the two, making it very convenient to position popovers relative to their controls using <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/CSS_anchor_positioning">CSS anchor positioning</a>. See <a href="https://developer.mozilla.org/en-us/docs/Web/API/Popover_API/Using#popover_anchor_positioning">Popover anchor positioning</a> for more details.</li>
<li>The browser creates an implicit anchor reference between the two, making it very convenient to position popovers relative to their controls using <a href="https://developer.mozilla.org/en-us/docs/Web/CSS/Guides/Anchor_positioning">CSS anchor positioning</a>. See <a href="https://developer.mozilla.org/en-us/docs/Web/API/Popover_API/Using#popover_anchor_positioning">Popover anchor positioning</a> for more details.</li>
</ul></div>
<div class='content'>By <a href='https://developer.mozilla.org/en-us/docs/web/html/reference/elements/button#popovertarget/contributors.txt'>Mozilla Contributors</a>, <a href='https://creativecommons.org/licenses/by-sa/2.5/'>CC BY-SA 2.5</a></div>