header, footer or main element inside dialog element in html5











up vote
0
down vote

favorite












Is semantically correct to use a header, footer o main elements inside a dialog component in Html5?.



I want to build a complex modal view with options about articles in my main page content. I am wondering if is correct use html5 as follows



  <dialog> 
<header>
<h1>Title</h1>
<button> Save </button>
</header>
<main>
<!--modal view options-->
</main>

</dialog>









share|improve this question




























    up vote
    0
    down vote

    favorite












    Is semantically correct to use a header, footer o main elements inside a dialog component in Html5?.



    I want to build a complex modal view with options about articles in my main page content. I am wondering if is correct use html5 as follows



      <dialog> 
    <header>
    <h1>Title</h1>
    <button> Save </button>
    </header>
    <main>
    <!--modal view options-->
    </main>

    </dialog>









    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Is semantically correct to use a header, footer o main elements inside a dialog component in Html5?.



      I want to build a complex modal view with options about articles in my main page content. I am wondering if is correct use html5 as follows



        <dialog> 
      <header>
      <h1>Title</h1>
      <button> Save </button>
      </header>
      <main>
      <!--modal view options-->
      </main>

      </dialog>









      share|improve this question















      Is semantically correct to use a header, footer o main elements inside a dialog component in Html5?.



      I want to build a complex modal view with options about articles in my main page content. I am wondering if is correct use html5 as follows



        <dialog> 
      <header>
      <h1>Title</h1>
      <button> Save </button>
      </header>
      <main>
      <!--modal view options-->
      </main>

      </dialog>






      html html5 header dialog main






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 3 '17 at 19:32

























      asked Apr 3 '17 at 13:55









      Leo

      63




      63
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Only the <main> tag shouldn't be there.



          As copied from W3schools:




          The header element represents a container for introductory content or a set of navigational links.




          And:




          You can have several header elements in one document.




          This applies to the header and the footer.



          but then there is this:




          There must not be more than one main element in a document. The main element must NOT be a descendant of an article, aside, footer, header, or nav element.




          So, to say it in a short way:



          you can use multiple <header> and <footer> tags in your document, but you're better of using a <div> instead of your <main>






          share|improve this answer























          • If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
            – Martijn Vissers
            Apr 4 '17 at 10:22











          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%2f43186545%2fheader-footer-or-main-element-inside-dialog-element-in-html5%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Only the <main> tag shouldn't be there.



          As copied from W3schools:




          The header element represents a container for introductory content or a set of navigational links.




          And:




          You can have several header elements in one document.




          This applies to the header and the footer.



          but then there is this:




          There must not be more than one main element in a document. The main element must NOT be a descendant of an article, aside, footer, header, or nav element.




          So, to say it in a short way:



          you can use multiple <header> and <footer> tags in your document, but you're better of using a <div> instead of your <main>






          share|improve this answer























          • If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
            – Martijn Vissers
            Apr 4 '17 at 10:22















          up vote
          1
          down vote













          Only the <main> tag shouldn't be there.



          As copied from W3schools:




          The header element represents a container for introductory content or a set of navigational links.




          And:




          You can have several header elements in one document.




          This applies to the header and the footer.



          but then there is this:




          There must not be more than one main element in a document. The main element must NOT be a descendant of an article, aside, footer, header, or nav element.




          So, to say it in a short way:



          you can use multiple <header> and <footer> tags in your document, but you're better of using a <div> instead of your <main>






          share|improve this answer























          • If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
            – Martijn Vissers
            Apr 4 '17 at 10:22













          up vote
          1
          down vote










          up vote
          1
          down vote









          Only the <main> tag shouldn't be there.



          As copied from W3schools:




          The header element represents a container for introductory content or a set of navigational links.




          And:




          You can have several header elements in one document.




          This applies to the header and the footer.



          but then there is this:




          There must not be more than one main element in a document. The main element must NOT be a descendant of an article, aside, footer, header, or nav element.




          So, to say it in a short way:



          you can use multiple <header> and <footer> tags in your document, but you're better of using a <div> instead of your <main>






          share|improve this answer














          Only the <main> tag shouldn't be there.



          As copied from W3schools:




          The header element represents a container for introductory content or a set of navigational links.




          And:




          You can have several header elements in one document.




          This applies to the header and the footer.



          but then there is this:




          There must not be more than one main element in a document. The main element must NOT be a descendant of an article, aside, footer, header, or nav element.




          So, to say it in a short way:



          you can use multiple <header> and <footer> tags in your document, but you're better of using a <div> instead of your <main>







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 4 hours ago

























          answered Apr 3 '17 at 14:18









          Martijn Vissers

          236115




          236115












          • If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
            – Martijn Vissers
            Apr 4 '17 at 10:22


















          • If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
            – Martijn Vissers
            Apr 4 '17 at 10:22
















          If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
          – Martijn Vissers
          Apr 4 '17 at 10:22




          If you find this answer useful, please upvote and / or accept this answer. It will help others find it and will stop this question from going back on top
          – Martijn Vissers
          Apr 4 '17 at 10:22


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43186545%2fheader-footer-or-main-element-inside-dialog-element-in-html5%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

          Volksrepublik China

          How to test boost logger output in unit testing?

          Write to the output between two pipeline