2012-03-20 5 views
0

새로운 사이트에서 내 검색에 HTML5 특정 태그를 사용해야 만 의미 상 정확 할 수 있습니까? 내 사이트의 구조가이내 검색에 HTML5 태그를 사용해야합니까?

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

검색이 페이지에 중요한 역할을 주로하기 때문에 내 관심사입니다 같은 것입니다.

<input type="search"> 

검색하고 웹 사이트를 탐색하는 방법이다, 그래서 당신은 단지 <nav> 요소를 추가 할 수 있습니다

답변

3

당신은 사용할 수 있습니다.

이 경우 <nav> 요소는 <header>, just like the last example in the spec의 하위 요소가 될 수 있습니다. 이 (당신이 HTML5를 따르는 경우)해야

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

나는이 방법에 대해 읽어하지만 난

0

당신의 구조 :

<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> 
관련 문제