开发者

Should I use heading tags in my navigation menus

开发者 https://www.devze.com 2023-01-21 22:36 出处:网络
Ive always wondered about this.I like to create super navigation menus.The website I am currently working on for example has a blog tab at the to开发者_开发技巧p, which has a drop down with latest blo

Ive always wondered about this. I like to create super navigation menus. The website I am currently working on for example has a blog tab at the to开发者_开发技巧p, which has a drop down with latest blog posts and some other stuff.

Should I use heading tags for Semantics and SEO?

Here is my current structure:

<li class="submenu supermenu" id="blogmenu">
    <a href="/blog/">Blog</a>
    <ul>
        <li>                    
            <h4>Recent Posts</h4>
            <ul id="recentposts">
                <li>
                    <h5><a href="/blog/some-blog">Some blog title</a></h5>
                    <p>Snippet of blog post here...</p>
                </li>
                <li>
                    <h5><a href="/blog/some-blog">Some blog title</a></h5>
                    <p>Snippet of blog post here...</p>
                </li>
            </ul>
        </li>
        <li><a id="bloglink" href="/blog/">View the full Blog</a></li>  
    </ul>
</li>

What do you guys think?


Yes, I do it all the time. It is a heading, so the semantic equivalent in HTML is one of the hn elements - h4 is a good choice here, assuming h1, h2, and h3 are used for more important heading in your page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号