Semantics markup for home sliders

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite
1












Is there a "best" or more suitable markup to home sliders?



I have the following markup. Since my sliders are related to articles, I decided to put article as the main container.



Note: I am using Owl Slider to convert what is inside .home-slider actually in a slider.



<section class="home-slider">
<!-- Slide One -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>

<!-- slide Two -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>
</section>






share|improve this question





















  • What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
    – Malachi♦
    May 2 at 20:48










  • Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
    – Abiel Muren
    May 3 at 2:13
















up vote
1
down vote

favorite
1












Is there a "best" or more suitable markup to home sliders?



I have the following markup. Since my sliders are related to articles, I decided to put article as the main container.



Note: I am using Owl Slider to convert what is inside .home-slider actually in a slider.



<section class="home-slider">
<!-- Slide One -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>

<!-- slide Two -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>
</section>






share|improve this question





















  • What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
    – Malachi♦
    May 2 at 20:48










  • Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
    – Abiel Muren
    May 3 at 2:13












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





Is there a "best" or more suitable markup to home sliders?



I have the following markup. Since my sliders are related to articles, I decided to put article as the main container.



Note: I am using Owl Slider to convert what is inside .home-slider actually in a slider.



<section class="home-slider">
<!-- Slide One -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>

<!-- slide Two -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>
</section>






share|improve this question













Is there a "best" or more suitable markup to home sliders?



I have the following markup. Since my sliders are related to articles, I decided to put article as the main container.



Note: I am using Owl Slider to convert what is inside .home-slider actually in a slider.



<section class="home-slider">
<!-- Slide One -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>

<!-- slide Two -->
<article>
<h1>Title</h1>
<h2>Little Description</h2>
<a href="">Call to Action Link</a>
</article>
</section>








share|improve this question












share|improve this question




share|improve this question








edited May 2 at 23:30









Jamal♦

30.1k11114225




30.1k11114225









asked May 2 at 18:26









Abiel Muren

62




62











  • What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
    – Malachi♦
    May 2 at 20:48










  • Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
    – Abiel Muren
    May 3 at 2:13
















  • What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
    – Malachi♦
    May 2 at 20:48










  • Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
    – Abiel Muren
    May 3 at 2:13















What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
– Malachi♦
May 2 at 20:48




What makes your "sliders" slide? I think that we may need a little more context to be able to give you a proper review.
– Malachi♦
May 2 at 20:48












Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
– Abiel Muren
May 3 at 2:13




Hello, I use Owl Carousel like this: home-slider owl-carousel and all the ´<article>´ get converted to slides. owl carousel preserves the markup.
– Abiel Muren
May 3 at 2:13










2 Answers
2






active

oldest

votes

















up vote
2
down vote













For me the main semantic question is whether you should have a section containing articles or an article containing sections. Or perhaps even an article containing other sub-articles.



From the HTML spec:




The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.




It really comes down to the content of your articles and sections.



  • If each slide could be viewed as an independent thing, then marking them with article seems fine.

  • If however, you'd expect the slides to be viewed in sequence as in slide show, I'd say the slides should be sections instead.





share|improve this answer




























    up vote
    1
    down vote













    If you want to follow the advice from the HTML spec, you should use the heading element that represents the actual rank, not a h1. It doesn’t matter for user agents that support the outline algorithm, but it can matter for older user agents, especially for accessibility.



    The description shouldn’t be in a heading element. Otherwise the following content (in your case: the link) would be in scope of this description, not in scope of the top heading. Use p instead.



    For the link, you could use the bookmark link type, if it goes to the page that has the full content that this slide is a teaser for.



    So a slide could use this markup (assuming that the slider appears on the level below the page’s h1):



    <article>
    <h2>Title</h2>
    <p>Little Description</p>
    <a href="" rel="bookmark">Call to Action Link</a>
    </article>





    share|improve this answer





















      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
      );
      );
      , "mathjax-editing");

      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: "196"
      ;
      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: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f193485%2fsemantics-markup-for-home-sliders%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      For me the main semantic question is whether you should have a section containing articles or an article containing sections. Or perhaps even an article containing other sub-articles.



      From the HTML spec:




      The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.




      It really comes down to the content of your articles and sections.



      • If each slide could be viewed as an independent thing, then marking them with article seems fine.

      • If however, you'd expect the slides to be viewed in sequence as in slide show, I'd say the slides should be sections instead.





      share|improve this answer

























        up vote
        2
        down vote













        For me the main semantic question is whether you should have a section containing articles or an article containing sections. Or perhaps even an article containing other sub-articles.



        From the HTML spec:




        The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.




        It really comes down to the content of your articles and sections.



        • If each slide could be viewed as an independent thing, then marking them with article seems fine.

        • If however, you'd expect the slides to be viewed in sequence as in slide show, I'd say the slides should be sections instead.





        share|improve this answer























          up vote
          2
          down vote










          up vote
          2
          down vote









          For me the main semantic question is whether you should have a section containing articles or an article containing sections. Or perhaps even an article containing other sub-articles.



          From the HTML spec:




          The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.




          It really comes down to the content of your articles and sections.



          • If each slide could be viewed as an independent thing, then marking them with article seems fine.

          • If however, you'd expect the slides to be viewed in sequence as in slide show, I'd say the slides should be sections instead.





          share|improve this answer













          For me the main semantic question is whether you should have a section containing articles or an article containing sections. Or perhaps even an article containing other sub-articles.



          From the HTML spec:




          The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.




          It really comes down to the content of your articles and sections.



          • If each slide could be viewed as an independent thing, then marking them with article seems fine.

          • If however, you'd expect the slides to be viewed in sequence as in slide show, I'd say the slides should be sections instead.






          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered May 3 at 12:47









          Rene Saarsoo

          2,016714




          2,016714






















              up vote
              1
              down vote













              If you want to follow the advice from the HTML spec, you should use the heading element that represents the actual rank, not a h1. It doesn’t matter for user agents that support the outline algorithm, but it can matter for older user agents, especially for accessibility.



              The description shouldn’t be in a heading element. Otherwise the following content (in your case: the link) would be in scope of this description, not in scope of the top heading. Use p instead.



              For the link, you could use the bookmark link type, if it goes to the page that has the full content that this slide is a teaser for.



              So a slide could use this markup (assuming that the slider appears on the level below the page’s h1):



              <article>
              <h2>Title</h2>
              <p>Little Description</p>
              <a href="" rel="bookmark">Call to Action Link</a>
              </article>





              share|improve this answer

























                up vote
                1
                down vote













                If you want to follow the advice from the HTML spec, you should use the heading element that represents the actual rank, not a h1. It doesn’t matter for user agents that support the outline algorithm, but it can matter for older user agents, especially for accessibility.



                The description shouldn’t be in a heading element. Otherwise the following content (in your case: the link) would be in scope of this description, not in scope of the top heading. Use p instead.



                For the link, you could use the bookmark link type, if it goes to the page that has the full content that this slide is a teaser for.



                So a slide could use this markup (assuming that the slider appears on the level below the page’s h1):



                <article>
                <h2>Title</h2>
                <p>Little Description</p>
                <a href="" rel="bookmark">Call to Action Link</a>
                </article>





                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  If you want to follow the advice from the HTML spec, you should use the heading element that represents the actual rank, not a h1. It doesn’t matter for user agents that support the outline algorithm, but it can matter for older user agents, especially for accessibility.



                  The description shouldn’t be in a heading element. Otherwise the following content (in your case: the link) would be in scope of this description, not in scope of the top heading. Use p instead.



                  For the link, you could use the bookmark link type, if it goes to the page that has the full content that this slide is a teaser for.



                  So a slide could use this markup (assuming that the slider appears on the level below the page’s h1):



                  <article>
                  <h2>Title</h2>
                  <p>Little Description</p>
                  <a href="" rel="bookmark">Call to Action Link</a>
                  </article>





                  share|improve this answer













                  If you want to follow the advice from the HTML spec, you should use the heading element that represents the actual rank, not a h1. It doesn’t matter for user agents that support the outline algorithm, but it can matter for older user agents, especially for accessibility.



                  The description shouldn’t be in a heading element. Otherwise the following content (in your case: the link) would be in scope of this description, not in scope of the top heading. Use p instead.



                  For the link, you could use the bookmark link type, if it goes to the page that has the full content that this slide is a teaser for.



                  So a slide could use this markup (assuming that the slider appears on the level below the page’s h1):



                  <article>
                  <h2>Title</h2>
                  <p>Little Description</p>
                  <a href="" rel="bookmark">Call to Action Link</a>
                  </article>






                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered May 5 at 2:45









                  unor

                  2,285721




                  2,285721






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f193485%2fsemantics-markup-for-home-sliders%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Python Lists

                      Aion

                      JavaScript Array Iteration Methods