惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
量子位
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
D
Docker
罗磊的独立博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
IT之家
IT之家
MyScale Blog
MyScale Blog
Microsoft Azure Blog
Microsoft Azure Blog

John Bokma's Hacking and Hiking

Setting up a Brother AirPrinter on Ubuntu Failed to verify signature archive-contents.sig in Emacs Aquamacs 3.6 Hangs When Saving An Encrypted File PAR trouble How To Create a Bootable LibreELEC Installation using Mac OS Running pdflatex Using the Alpine Pandoc LaTeX Docker Image A Docker Image for Sass Timezones in Alpine Docker Containers A Tale of Three Docker Images Debugging a Perl Docker container Perl Time::Piece Unicode Issue Giving Docker Desktop for macOS a Second Chance Flashing another TP-Link TL-WDR4300 with OpenWrt firmware Rehousing two tarantulas Getting started with the Perl version of tumblelog on Ubuntu 18.04 LTS A visit to Avonturia De Vogelkelder Flashing a TP-Link TL-WDR4300 with OpenWrt firmware Mounting a VDI File in a Different VirtualBox Guest Wireless Headless Raspberry Pi - John Bokma A Matter of Time - John Bokma Hand coding an RSS 2.0 feed in Python RFC #822 and RFC #3339 dates in Perl RFC #822 and RFC #3339 dates in Python Hand coding an RSS 2.0 feed in Perl Rewriting CommonMark Nodes in Perl "right" this time
Nav Element with no Heading
John Bokma · 2019-09-25 · via John Bokma's Hacking and Hiking

September 24, 2019

Last Thursday, while playing with the W3C Markup Validation Service with as input my other blog, Plurrrr, I noticed twice the following remark in the Structural outline after I had selected Show Outline as an option:

[nav element with no heading]

While this is not an error nor a warning; a nav element has an optional heading, I noticed that I could easily remove the bottom remark because the HTML5 I use is as follows:

<section>
    <header>
        <h2>Archive</h2>
    </header>
    <nav>
        <dl class="tl-archive">
        :
        :
        </dl>
   </nav>
</section>

The definition list contains all links to the week pages, using a nested unordered list.

As you can see I do output a heading element, only not inside the nav element but in a wrapping section element. Because nav is also a sectioning element this can be shortened to:

<nav class="tl-archive">
    <h2>Archive</h2>
    <dl>
    :
    :
    </dl>
</nav>

Note that in order to style this I reused the class tl-archive with a different styling.

So today, in the evening I modified in both the Perl and Python code the function html_for_archive to no longer output the nav element, as this element moved to the HTML template. Also the class attribute was no longer required.

Next I edited the HTML template file and the CSS file.

Finally, I bumped the version to 2.1.0 and pushed it to GitHub.