我应该在导航菜单中使用标题标签吗

发布于 2024-09-29 01:49:02 字数 1015 浏览 2 评论 0原文

我一直想知道这个问题。我喜欢创建超级导航菜单。例如,我目前正在开发的网站顶部有一个博客选项卡,其中包含最新博客文章和其他一些内容的下拉菜单。

我应该使用标题标签进行语义和搜索引擎优化吗?

这是我目前的结构:

<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>

你们觉得怎么样?

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 top, 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渡你暖光 2024-10-06 01:49:02

是的,我一直这样做。它一个标题,因此 HTML 中的语义等价物是 hn 元素之一 - h4 在这里是一个不错的选择,假设 h1h2h3 用于页面中更重要的标题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文