Stackoverflow and the <kbd> tag

Every now and then, while looking up an old answer, I am reminded of some of the more inscrutable policies on Stackoverflow. One of those concerns the venerable <kbd> tag.

HTML5 says: “The kbd element represents user input (typically keyboard input, …)”. According to HTML 4 it “[i]ndicates text to be entered by the user.”

Therefore, I used to enclose perldoc links in <kbd> tags. For example, when recommending a poster to check the documentation for open, I would write <kbd>[perldoc -f open](http://perlodoc.perl.org/functions/open.html)</kbd>.

This is important because, while I link to online Perl documentation for convenience, the documentation online is not necessarily the same version as the poster has installed. Therefore, the programmer needs to remember to first check the detailed and useful documentation that applies to that specific version of Perl.

But, Stackoverflow decided at some point to pretend <kbd> represents just a single keypress not “text entered by user” or “user input.” So, if you make the arguably semantically correct formatting choice, someone will swoop down and butcher your answer, removing from it the suggestion that the perldoc command is something you need to type on your computer to get the documentation that applies to your Perl installation.