1

Wordpress HTML5 テンプレートを作成していますが、ヘッダー ナビゲーションの構造が正しいかどうか疑問に思っています。

ここに画像の説明を入力

スクリーンショットでわかるように、1 つの「メイン」メニュー (musique/arts/design...) と、右上に別の "secondary" メニュー (propos/publicité...) があります。私の懸念はその最後のものについてです。これは私が選択した HTML です。

<div class="header-nav grid_6">
  <ul id="menu-top-menu" class="clearfix">
    <li id="menu-item-217" class="menu-item menu-item-type-custom menu-item-object-custom first-menu-item menu-item-217"> <a href="http://#">A propos</a> </li>
    <li id="menu-item-218" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218"> <a href="http://#">Publicité</a> </li>
    <li id="menu-item-219" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-219"> <a href="http://#">Partenaires</a> </li>
    <li id="menu-item-220" class="menu-item menu-item-type-custom menu-item-object-custom last-menu-item menu-item-220"> <a href="http://#">Contact</a> </li>
 </ul> 
</div>

ご覧のとおり、本当に基本的なものです。仕様では、それはある種の主要なナビゲーションである必要があると書かれているため、要素だけを使用し、<ul>要素にラップしないことにしました。私の場合、それらのリンクはサイトに表示されるメイン コンテンツとはあまり関係ありません。<nav>

私が間違っているかどうか誰か教えてもらえますか?

ありがとう!

4

2 に答える 2

0

You should use the nav tag for the navigation.

According to the specification

The nav element represents a section of a document that links to other documents or to parts within the document itself; that is, a section of navigation links.

So you can use the nav for all kinds of menus/navigational links. Also it is a good idea to use the header and footer tags.

Once you use the nav and header tags you can reduce the number of classes by using these tags directly in your CSS like below.

header {
    /*style header*/
}
nav {
    /*style navigation*/
}
于 2013-06-27T08:46:33.460 に答える