How can I embed schema.org markup in svg?

Member

by delpha , in category: SEO , a year ago

How can I embed schema.org markup in svg?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by june.crooks , a year ago

@delpha 

Embedding schema.org markup in SVG can be done by adding metadata to the SVG file using the namespaces and tags provided by schema.org. Here's a step-by-step guide to help you:

  1. Open your SVG file in a text editor (e.g., Notepad, Sublime Text).
  2. At the beginning of your SVG file, add the following XML namespaces:
1
2
3
4
5
6
7
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:cc="http://web.resource.org/cc/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:svg="http://www.w3.org/2000/svg"
     xmlns:so="http://schema.org/"
     xmlns:xml="http://www.w3.org/XML/1998/namespace">


  1. Identify the section of your SVG file that you want to add schema.org markup to, and wrap it with the
1
2
3
<metadata>
  <!-- Add your schema.org markup here -->
</metadata>


  1. Within the
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<metadata>
  <rdf:RDF>
    <cc:Work rdf:about="">
      <dc:format>image/svg+xml</dc:format>
      <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
      <dc:title>
        <rdf:Alt>
          <rdf:li xml:lang="en">My SVG Image</rdf:li>
        </rdf:Alt>
      </dc:title>
      <!-- Add more schema.org properties if needed -->
    </cc:Work>
  </rdf:RDF>
</metadata>


Note: This example shows how to add schema.org markup for a simple SVG image.

  1. Save the modified SVG file, making sure it retains the .svg file extension.


By following these steps, you can embed schema.org markup in your SVG file. Make sure to adjust the schema.org properties and values according to your specific use case.