Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string valueresults in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

replaced http://webmasters.stackexchange.com/ with https://webmasters.stackexchange.com/
Source Link

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite insteadinstead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

updated
Source Link
unor
  • 21.9k
  • 3
  • 47
  • 118

Microdata (Note) can only be used on HTML elements as defined by HTML5. According to HTML5 (CR), the svg elementsvg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div elementselement:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image resp. itsimage’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

Some search engines might not like the meta/link way very much.

(c) You could use the img element. According (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5.):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata (Note) can only be used on HTML elements as defined by HTML5. According to HTML5 (CR), the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add meaningless div elements:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image resp. its URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

Some search engines might not like the meta/link way very much.

(c) You could use the img element. According to caniuse.com using SVG files in img has more support than using SVG inline in HTML5.

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

Microdata can only be used on HTML elements as defined by HTML5. According to HTML5, the svg element is not in the HTML namespace. WHATWG’s HTML spec explicitly mentions that Microdata doesn’t work for svg (quoted on 2014-01-02):

Currently, the itemscope, itemprop, and other microdata attributes are only defined for HTML elements. This means that attributes with the literal names "itemscope", "itemprop", etc, do not cause microdata processing to occur on elements in other namespaces, such as SVG.

(a) You could add a meaningless div element:

<div itemscope itemtype="http://schema.org/Organization">
  <div itemprop="logo">
    <svg>…</svg>
  </div>
</div>

Microdata parsers would understand that the content of the div element with the logo property contains the organization’s logo. But as the svg element is not part of HTML, there are no rules defined for getting the correct value (= the image’s URL) out of it. So it’s very unlikely that Microdata parsers could do something with this information (e.g., showing the logo in a different context).
Note that using itemprop on a div element results in a string value, which is not what Schema.org expects for the logo property.

(b) You could duplicate the information with the "hidden" link:

<div itemscope itemtype="http://schema.org/Organization">
  <svg>…</svg>
  <link itemprop="logo" href="logo.svg" />
</div>

(c) You could use the img element (according to caniuse.com using SVG files in img has more support than using SVG inline in HTML5):

<div itemscope itemtype="http://schema.org/Organization">
  <img itemprop="logo" src="logo.svg" alt="ACME Inc." />
</div>

(d) Maybe you could use RDFa Lite instead, but I’m not sure if it works for "mixed" namespaces. But for SVG 1.2 Tiny, RDFa can be used in the metadata element.

added 22 characters in body
Source Link
unor
  • 21.9k
  • 3
  • 47
  • 118
Loading
added 19 characters in body
Source Link
unor
  • 21.9k
  • 3
  • 47
  • 118
Loading
Source Link
unor
  • 21.9k
  • 3
  • 47
  • 118
Loading