How to implement Schema.org properties in meta data?











up vote
1
down vote

favorite












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




























    up vote
    1
    down vote

    favorite












    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


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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 2 days ago









      unor

      64.8k17132234




      64.8k17132234










      asked 2 days ago









      smares

      386318




      386318
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          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




























            up vote
            0
            down vote













            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
              2 days ago













            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',
            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








            up vote
            1
            down vote



            accepted










            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

























              up vote
              1
              down vote



              accepted










              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























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                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 2 days ago









                unor

                64.8k17132234




                64.8k17132234
























                    up vote
                    0
                    down vote













                    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
                      2 days ago

















                    up vote
                    0
                    down vote













                    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
                      2 days ago















                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    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 2 days ago









                    smares

                    386318




                    386318








                    • 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
                      2 days ago
















                    • 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
                      2 days ago










                    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
                    2 days ago






                    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
                    2 days ago




















                     

                    draft saved


                    draft discarded



















































                     


                    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

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                    Calculate evaluation metrics using cross_val_predict sklearn

                    Insert data from modal to MySQL (multiple modal on website)