2014-03-04 5 views
0

<header> 태그를 <section> 안에 넣는 것이 좋습니다. <header>, <article>, <aside>, <footer> 내에서 올바른지 확인했습니다.섹션 내의 태그 헤더

<section>은 우리 페이지의 다른 테마를 구분하는 데 사용되어 종종 <header>과 함께 <article>을 찾을 수 있습니다. 그렇다면 태그를 <section>에 사용하는 정확성에 대한 나의 의심.

<body> 
<header> 
    <hgroup> 
    <h1>hello</h1> 
    <h2>world</h2> 
    </hgroup> 
</header> 
<section> 
    <header>Total news</header> 
    <article> 
    <header><h1>News</h1></header> 
    <section> 
    <header>Daily news</header> 
    <article> 
    <header><h2>News 1 title</h2></header> 
    <p>news 1</p> 
    </article> 
    <article> 
    <header><h2>News 2 title</h2></header> 
    <p>news 2</p> 
    </article> 
    </section> 
    </article> 
</section> 
<section> 
    <header><h1>Another section</h1></header> 
    <article> 
    <p>Content of another section</p> 
    </article> 
</section> 
<footer> 
    <p>Copyright</p> 
</footer> 
</body> 
+0

HTML5 태그는 검색 엔진이 콘텐츠를 처음부터 쉽게 이해할 수 있도록 설계되었습니다. 섹션을 래퍼로 보지 마세요, 귀하의 콘텐츠에서 볼 수있는 부분이 원인이됩니다. 머리글 사용은 피해야한다고 생각하지만 내 의견이 맞습니다. 자세한 내용은이 사이트를 확인하십시오. http://html5doctor.com/avoiding-common-html5-mistakes/ – Dorvalla

답변

0

첫 번째 헤더 <header>Total news</header> 간단한 <H1> 될 것이다.

<header><h1>News</h1></header><hgroup><h1>News</h1></hgroup> 것 또한 태그의 사용량에 대해 생각해야

(당신이 그나마이 예에서는 정말 용기가 필요합니다). 그것이 '올바른 순서'이기 때문에 모든 것을 사용할 필요는 없습니다. 태그를 적게 사용할수록 좋습니다.