2012-03-20 11 views
0

新しいサイトでの検索にHTML5固有のタグを使用して、意味的に正しいままにする必要がありますか? 私のサイトの構造は、この検索にHTML5タグを使用する必要がありますか?

-------------------- 
     Header 
-------------------- 
search | nav 
-------------------- 
     article 
-------------------- 
     footer 
-------------------- 

検索はこのページで重要な役割を果たしている主な理由はこれが私の関心事であるようなものです。

<input type="search"> 

検索は、ウェブサイトをナビゲートする方法ですので、あなただけの<nav>要素に追加することができます:

答えて

3

あなたが使用することができます。

この場合、<nav>要素は、<header>just like the last example in the specの子要素になります。

<header> 
    <h1>Site title</h1> 
    <input type="search" placeholder="Search…"> 
    <nav> 
    … 
    </nav> 
</header> 
<article> 
    <h1>Page title</h1> 
</article> 
<footer> 
    … 
</footer> 
+0

私は、このアプローチについて読んだが、私は

0

あなたの構造は、この(あなたがHTML5に従っている場合)必要があります。

<header>this is header</header> 

<section> 
    <section> 
     <form> 
      <input type="search"> 
     </form> 
    </section> 
    <nav> 
     this is navigation 
    </nav> 
</section> 

<main> 
    <article>this content article</article> 
    <aside>this sidebar</aside> 
</main> 


<footer>this is footer</footer> 
関連する問題