How to implement Schema.org properties in meta data?












1















Schema.org describes how to implement object properties using the meta tag but the examples given are properties with primitive types such as Text or Boolean. Let's say I want to display a grid of images and each image is of type ImageObject. The copyrightHolder property itself is either an Organization or Person. If I want to include the organization legal name, how would I do that using only meta data?



With "regular" HTML elements I would write:



<span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<span itemprop="legalName">ACME Inc.</span>
</span>


This obviously doesn't look right:



<meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="legalName" content="ACME Inc.">
</meta>


The only thing that comes into mind is using a set of hidden spans or divs.










share|improve this question





























    1















    Schema.org describes how to implement object properties using the meta tag but the examples given are properties with primitive types such as Text or Boolean. Let's say I want to display a grid of images and each image is of type ImageObject. The copyrightHolder property itself is either an Organization or Person. If I want to include the organization legal name, how would I do that using only meta data?



    With "regular" HTML elements I would write:



    <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
    <span itemprop="legalName">ACME Inc.</span>
    </span>


    This obviously doesn't look right:



    <meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="legalName" content="ACME Inc.">
    </meta>


    The only thing that comes into mind is using a set of hidden spans or divs.










    share|improve this question



























      1












      1








      1








      Schema.org describes how to implement object properties using the meta tag but the examples given are properties with primitive types such as Text or Boolean. Let's say I want to display a grid of images and each image is of type ImageObject. The copyrightHolder property itself is either an Organization or Person. If I want to include the organization legal name, how would I do that using only meta data?



      With "regular" HTML elements I would write:



      <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
      <span itemprop="legalName">ACME Inc.</span>
      </span>


      This obviously doesn't look right:



      <meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="legalName" content="ACME Inc.">
      </meta>


      The only thing that comes into mind is using a set of hidden spans or divs.










      share|improve this question
















      Schema.org describes how to implement object properties using the meta tag but the examples given are properties with primitive types such as Text or Boolean. Let's say I want to display a grid of images and each image is of type ImageObject. The copyrightHolder property itself is either an Organization or Person. If I want to include the organization legal name, how would I do that using only meta data?



      With "regular" HTML elements I would write:



      <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
      <span itemprop="legalName">ACME Inc.</span>
      </span>


      This obviously doesn't look right:



      <meta itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="legalName" content="ACME Inc.">
      </meta>


      The only thing that comes into mind is using a set of hidden spans or divs.







      html schema.org microdata






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 '18 at 11:27









      unor

      65.7k17138242




      65.7k17138242










      asked Nov 21 '18 at 10:44









      smaressmares

      401518




      401518
























          2 Answers
          2






          active

          oldest

          votes


















          2














          Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:





          • link (with itemprop) for values that are URLs


          • meta (with itemprop) for values that aren’t URLs


          • div/span (with itemscope) for items


          So your example could look like this:



          <div itemscope itemtype="http://schema.org/ImageObject">
          <div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
          <meta itemprop="legalName" content="ACME Inc." />
          </div>
          </div>


          If you want to provide the whole structured data in the head element (where div/span aren’t allowed), see this answer. If you only want to provide a few properties in the head element, you can make use of the itemref attribute.



          That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).






          share|improve this answer































            0














            I was reading Getting Started again and noticed 2b that states




            When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.




            So I assume it would be fine to just use



            <meta itemprop="copyrightHolder" content="ACME Inc.">





            share|improve this answer



















            • 1





              Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

              – unor
              Nov 21 '18 at 11:54













            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410354%2fhow-to-implement-schema-org-properties-in-meta-data%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:





            • link (with itemprop) for values that are URLs


            • meta (with itemprop) for values that aren’t URLs


            • div/span (with itemscope) for items


            So your example could look like this:



            <div itemscope itemtype="http://schema.org/ImageObject">
            <div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
            <meta itemprop="legalName" content="ACME Inc." />
            </div>
            </div>


            If you want to provide the whole structured data in the head element (where div/span aren’t allowed), see this answer. If you only want to provide a few properties in the head element, you can make use of the itemref attribute.



            That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).






            share|improve this answer




























              2














              Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:





              • link (with itemprop) for values that are URLs


              • meta (with itemprop) for values that aren’t URLs


              • div/span (with itemscope) for items


              So your example could look like this:



              <div itemscope itemtype="http://schema.org/ImageObject">
              <div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
              <meta itemprop="legalName" content="ACME Inc." />
              </div>
              </div>


              If you want to provide the whole structured data in the head element (where div/span aren’t allowed), see this answer. If you only want to provide a few properties in the head element, you can make use of the itemref attribute.



              That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).






              share|improve this answer


























                2












                2








                2







                Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:





                • link (with itemprop) for values that are URLs


                • meta (with itemprop) for values that aren’t URLs


                • div/span (with itemscope) for items


                So your example could look like this:



                <div itemscope itemtype="http://schema.org/ImageObject">
                <div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="legalName" content="ACME Inc." />
                </div>
                </div>


                If you want to provide the whole structured data in the head element (where div/span aren’t allowed), see this answer. If you only want to provide a few properties in the head element, you can make use of the itemref attribute.



                That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).






                share|improve this answer













                Using Microdata, if you want to provide structured data that is not visible on the page, you can make use of these elements:





                • link (with itemprop) for values that are URLs


                • meta (with itemprop) for values that aren’t URLs


                • div/span (with itemscope) for items


                So your example could look like this:



                <div itemscope itemtype="http://schema.org/ImageObject">
                <div itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Organization">
                <meta itemprop="legalName" content="ACME Inc." />
                </div>
                </div>


                If you want to provide the whole structured data in the head element (where div/span aren’t allowed), see this answer. If you only want to provide a few properties in the head element, you can make use of the itemref attribute.



                That said, if you want to provide much data in that hidden way, you might want to consider using JSON-LD instead of Microdata (see a comparison).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 11:45









                unorunor

                65.7k17138242




                65.7k17138242

























                    0














                    I was reading Getting Started again and noticed 2b that states




                    When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.




                    So I assume it would be fine to just use



                    <meta itemprop="copyrightHolder" content="ACME Inc.">





                    share|improve this answer



















                    • 1





                      Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                      – unor
                      Nov 21 '18 at 11:54


















                    0














                    I was reading Getting Started again and noticed 2b that states




                    When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.




                    So I assume it would be fine to just use



                    <meta itemprop="copyrightHolder" content="ACME Inc.">





                    share|improve this answer



















                    • 1





                      Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                      – unor
                      Nov 21 '18 at 11:54
















                    0












                    0








                    0







                    I was reading Getting Started again and noticed 2b that states




                    When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.




                    So I assume it would be fine to just use



                    <meta itemprop="copyrightHolder" content="ACME Inc.">





                    share|improve this answer













                    I was reading Getting Started again and noticed 2b that states




                    When browsing the schema.org types, you will notice that many properties have "expected types". This means that the value of the property can itself be an embedded item (see section 1d: embedded items). But this is not a requirement—it's fine to include just regular text or a URL.




                    So I assume it would be fine to just use



                    <meta itemprop="copyrightHolder" content="ACME Inc.">






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 21 '18 at 11:06









                    smaressmares

                    401518




                    401518








                    • 1





                      Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                      – unor
                      Nov 21 '18 at 11:54
















                    • 1





                      Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                      – unor
                      Nov 21 '18 at 11:54










                    1




                    1





                    Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                    – unor
                    Nov 21 '18 at 11:54







                    Correct, but note that it’s typically preferable to provide an item with a type explicitly. When using only a text value, consumers don’t necessarily know which type is meant (is it a person or is it an organization?), and authors can’t provide additional data (e.g., the URL of the copyright holder).

                    – unor
                    Nov 21 '18 at 11:54




















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410354%2fhow-to-implement-schema-org-properties-in-meta-data%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Costa Masnaga

                    Fotorealismo

                    Sidney Franklin