What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

A while ago I created this Meta discussion based on a few people using <kbd> tags to link to their JSFiddle demos: Stricter <kbd> formatting; disallow JSFiddle links and other non-kbd content from the <kbd> tag, but this was changed to . This is a similar discussion but without any automatic formatting rules enforced.


Yesterday I flagged http://stackoverflow.com/users/1577396/mr-green as all of his posts with JSFiddle demos use <kbd> tags to link to them, and it would simply take too long to edit all of his posts:

This person keeps putting links to their demos in kbd tags. I've edited a few of them, but don't have the time to go through all of his answers. Can you notify him what kbd tags are supposed to be used for?

Example usage: Working Fiddle

This was declined with the reason:

Hmmm, I don't think this is really that big a deal. Perhaps you should ask a discussion question (Discussion!) on Meta as to whether there should be a policy about this.

Can something please be enforced about this? Using this markup to link to non-user input goes against the HTML specification:

The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands).

share|improve this question
22  
Why does this matter at all? It's even rather pretty IMO. Compared to other complete abuse of random formatting for no good purpose, this is really, really minor and doesn't hurt anything AF̜̯̞̲̼̩͜ͅA͖͞I̛̩̮͇Ć̯͚T̯̖͍̩̼͚͝ͅ. What real-world problem does this cause? (Accessibility-type issues?) –  Mat May 25 '13 at 8:35
    
If this were a case of a user abusing kbd tags for every second word, you would have a point. If we enforce "no code formatting for non-code text", then why not do the same for kbd tags. But given that's it's a single button-y tag for a link, I say it's too minor to do anything against it. I might edit it out when I stumble upon it, but that's about it. –  Bart May 25 '13 at 8:45
15  
@Mat: It's pretty, but it's akin to using tables for layout just because they look the part: it's wrong. –  BoltClock's a Unicorn May 25 '13 at 9:01
5  
@BoltClock: I'm not disputing the fact that it's the wrong tag semantically. I fail to see an actual, real problem with that usage though. –  Mat May 25 '13 at 9:04
    
See my comments on ChristopherW's answer. –  BoltClock's a Unicorn May 25 '13 at 9:06
11  
Looks like a creative use of the available formatting to me. I massively prefer it to the h1 SQL Fiddle links I sometimes see. Perhaps we could have an option for link style to achieve this type of effect in a semantically acceptable way and have some sort of standardised way of presenting such links. –  Martin Smith May 25 '13 at 10:18
    
Though I agree with you as for <kbd>, I find your use of [meta-tag:status-declined] wrong as well. –  Arjan May 25 '13 at 13:27
5  
@MartinSmith: No, keyboard castles are a creative use of the formatting. It's not there so people can just use it for whatever they want to make their post look different. It's there so people can semantically mark up their keyboard input. Any other use should be edited out, period. I replace them with bold all the time. –  animuson May 25 '13 at 14:28
3  
@animuson are there rules about what the formatting markup is for and not for? I wasn't aware. IMO, I think this issue is pedantic application of personal preference. I'll mark up my posts how I see fit. –  Chris Sep 13 '13 at 15:15
2  
@Chris The HTML specifications? That's a pretty well-defined set of rules... –  animuson Sep 13 '13 at 16:14
7  
There's a StackOverflow rule that states all user-generated content must conform to the HTML specification? Which one? Where is that rule listed? Typically, when a user is presented with formatting options, they are allowed to use them -- why offer them without restriction if there are, in fact, restrictions? Generally, style is a matter of preference, unless there are rules otherwise. Are there such rules here on SO? –  Chris Sep 13 '13 at 16:27
7  
@animuson By that standard, your use of a horizontal rule in your answer below does not conform to the stated purpose of the HR element -- summary paragraph of preceding paragraphs is not a thematic break. You have also misused inline bold in place of a heading (according to draft HTML 5). OR... you can mark up your posts however you see fit. Sounds like a better route to me. –  Chris Sep 13 '13 at 16:34
4  
@Chris Horizontal rules act as separators between sections, and always have. That's how it's acting here - as a separator. One section is a full explanation and the other is a quick summary. I don't understand why you're so hung up on this. The bottom line is - if you're using user input markup where it shouldn't be used, then I will always support the user who edits it to not use it. –  animuson Sep 13 '13 at 16:42
3  
@animuson I'm sorry if you feel that you are being "attacked" because I question the ferocity of your opposition to a stylistic embellishment, to the point that you want to modify the behavior of other users through coercion or system design. I disagree that it is I that is "hung up" about it at all; my 2 comments upon having read about this silly thread for the first time hardly represent a significant outlay of time. Giving time and attention to editing all of a user's posts to remove their preferred stylistic formatting, on the other hand... –  Chris Sep 13 '13 at 16:54
2  
You know, if everything in HTML was still font tags and presentational attributes, we wouldn't be having this silly debate in the first place. –  BoltClock's a Unicorn Sep 13 '13 at 16:59
show 2 more comments

2 Answers 2

up vote 22 down vote accepted
+50

Is it improper?

Of course. The <kbd> element is meant to represent user input. It is not a means of making links look fancier or "styling" your posts, so to speak. It has a semantic meaning that should be obeyed and should not be abused. Just like we only use inline code for code and we don't use all-capitalized letters to emphasize text, we shouldn't be using the <kbd> element to make your links look like buttons. That's not what it's there for.


Making it Harder on Visitors

For those who really insist that using <kbd> for links makes them look nicer - no it doesn't. It makes it harder to even tell that it's a link. Take this basic example:

Example

Which one would you expect to be the link? The blue text that looks like a normal link, or the button-looking thing that doesn't have any resemblence of a link?

Where else on the Internet do you normally see inline links styled to look like buttons? Oh, what's that? Nowhere? So why are you doing it here? All it does is make it harder to tell if it's clickable or not.


"Well, there's no rule that says I can't."

Do we really need to list things out that plainly? The Markdown features are not there to accomodate your preferences or letyou make your post look however you want it to look. The features are there to convert easy-to-read text into valid HTML, and in the cases of pure HTML, provide a direct way of using HTML. The end result should still be semantically correct. By saying "Stack Exchange provides the features, so why not use them?" you might as well be saying "HTML provides the features, so why not use them?" Why not use them? Well, that's pretty simple to answer - because that's not a valid use of them.

HTML is a markup language; the elements it outlines are not there to style your text - that's what CSS is for. These issues are exactly why all the stylistic elements (such as <font>) and attributes (such as bgcolor) were removed from the HTML specifications.


Flagging Formatting Issues

Formatting issues such as <kbd> abuse are certainly not something that need moderator involvement in just about any case. Editing the post yourself to change the formatting to be correct is a perfectly fine solution, and I encourage any user to do so. If a user doesn't understand why you made the change, explain it to them or link them to a relevant question here on Meta. If they're insistent and keep rolling back the changes, then flagging for a moderator might be helpful, although we may already have a "rollback war" flag on the post. Sometimes a moderator indicating that the change is correct is all it takes, or locking the post may be the final option.

In the end, correct use of formatting will always prevail (at least in my eyes).

share|improve this answer
12  
We don't have an "official" policy on it, so messaging the user and telling them to knock it off is a bit of an abuse of power. Kind of like me coming here, leaving a comment to tell you to put on a goddamned collared shirt in your gravatar. We don't like t-shirt wearing hipsters here. So get with the program, mister, before I suspend your account! –  Won't May 25 '13 at 20:03
3  
True, @Won't, but then why not define a policy somewhere? That is what this discussion is asking for, I think. I'd welcome some authoritative answers (policy, or at least a guideline) on this, and on things such as excessive formatting, or using &nbsp; in Stack&nbsp;Overflow, or editing posts to add <kbd>, or linking very well known terms to Wikipedia, or using "EDIT" in text. –  Arjan May 26 '13 at 13:36
    
@Arjan: Where and how are we going to spell it out? In fact, I should be asking - where and how else are we to spell it out besides in /editing-help (which, let's face it, hardly anybody reads anyway)? –  BoltClock's a Unicorn May 27 '13 at 16:29
    
@animuson - I disagree with you, animuson. By modifying other's answers (like what you did on mine) to match a specific format that is defined by you solely is unreasonable. This is technically obliterating the creativity of users, making StackOverflow a very dull place. As said in ChristopherW's suggestion below, one should only encourage their preferred format, instead of changing it and locking the post afterward. This is obviously a misuse of power, and one doing this shall be condemned. –  Derek 朕會功夫 Feb 20 at 2:04
    
@animuson - PS: As a protest of this forced self-defined "format", I will change all my links in my future answers to <kbd>. If this kind of power-misusing continues, I will also change all the links in my previous answers. –  Derek 朕會功夫 Feb 20 at 2:07
5  
@Derek I'm not sure how else to show you that this is not a preferred format. You are abusing the feature by using it in a way that it was not meant to be used. If you really want to start a war here, I assure you, you will not win. –  animuson Feb 20 at 2:08
1  
@Derek朕會功夫 Please stop or I will stalk you for the rest of your life, finger hovering over the edit button, ready. Waiting. (but srsly, stahp, k? ;)) –  Doorknob Feb 20 at 2:12
    
@animuson - Don't misunderstand my words; I'm not trying to start a war, however by forcing others to use your preferred format is just unreasonable. In my and many's perspective, by using <kbd> it will appear more as a clickable content than just a boring blue text. This is all up to the answerer's choice of styling. This is nowhere near what you said "abusing". If you believe that simply styling links with <kbd> is abusing, then please explain this. Peaceful attitude is always more preferred. –  Derek 朕會功夫 Feb 20 at 2:16
    
@Derek朕會功夫 You want proof? W3C has guidelines on what is/isn't appropriate use. Also, that Regex answer has been brought up on meta time and time again... it's way different than a <kbd> tag though. –  hichris123 Feb 20 at 2:22
    
@Doorknob - Yes I understand that <kbd> may not be appealing to certain people, but you can't just editing someone's post because you don't agree with them. The truth is this minor styling is definitely valid. You can stalk me if you want, but it will just be a lose-lose situation for everyone. :( –  Derek 朕會功夫 Feb 20 at 2:25
1  
@Derek朕會功夫 My comment was meant partially as a joke, but this "minor styling" should not be used (the above post should convince you of that), and editing improper content/formatting out of a post is certainly valid. You could edit a post that said "Hi please help me with my JavaScript code", and kbd links are just as improper. (Okay, maybe not as bad, but you get the point :P) –  Doorknob Feb 20 at 2:28
    
@hichris123 - May I ask since when I have to strictly follow the W3C recommended guideline when I am writing an answer? I'm not trying to be rude but I have never heard of this rule before... Also, even the SO website itself doesn't follow the HTML5 stadards (according to the W3C markup validation service.) –  Derek 朕會功夫 Feb 20 at 2:33
    
Is this seriously a point of contention still? Is this what SO has been reduced to? Arguing over <kbd> with idle threats on both sides of the fence. We should all have an out of body experience and look upon ourselves...staring at our monitors...heatedly typing on a keyboard...arguing...about style –  ChristopherW Feb 20 at 5:16
1  
@ChristopherW: The Stylistic Parable. –  BoltClock's a Unicorn Feb 20 at 6:40
    
It's late, but I'd like to throw in my opinion: I had previously used the <kbd> tag to outline my Fiddle links, 1) because others were using it, and 2) because it attracted attention to what is an essential part of an answer. However, I had stopped with this habit after someone came along and edited out the tag - I think it's absolutely fair that it was changed, for the same reasons discussed above. SO ought to either 1) discourage use, or 2) directly state that usage of <kbd> tags to outline Fiddle links are okay. We should have some sort of rule in place. –  Albert Xing Mar 21 at 5:19
add comment

You really only have two options:

  1. If it really bothers you, edit it to formatting you see as appropriate, granted, it will probably get reverted.
  2. Leave it alone. In the grand scheme of things, this is relatively minor. Go with the flow.

There are worse things on Stack Overflow to worry about. Head over to suggested edits review and let that take your mind off of perceived <kbd> misuse.

Edit:

I'd like to readdress my answer for this issue because for some reason it still gets a lot of attention. I'm not backpedaling on my stance. I really just think this is a non-issue. We're arguing semantics here, not life and death, and for some reason a lot of people are getting bent out of shape because of a few pixels on a monitor. We all pick and choose our battles throughout life and this is just one battle that I am not going to get up in arms about.

Like I said, if it bothers you, by all means, fix it, but in the greater picture of the entire world, this is beyond minor. This is molecular. I'm not going to be the Improper KBD Usage Police. This doesn't mean you or I should encourage using it, this simply means that, as stated in the original posting, you have two options.

  1. Fix it
  2. Don't fix it

You can't tell people to fix it, especially if they don't want to. You can only encourage it. This is a volunteer community.

share|improve this answer
11  
The only difference between misuse of backticks and misuse of <kbd> elements is the frequency. Both are using markup elements for the wrong semantics. I would argue that the misuse of <kbd> elements is not just a perceived problem. Sure it's a minor problem compared to backtick misuse, but it's still a real problem. –  BoltClock's a Unicorn May 25 '13 at 8:59
16  
While this certainly isn't something that can be technically enforced hence the declined request, dismissing it as a non-issue - and even encouraging it by saying it looks nice (I get that aesthetics are subjective) - only serves to exacerbate the problem. We already have it bad with people misusing backticks to death; we don't need more people misusing <kbd> too. –  BoltClock's a Unicorn May 25 '13 at 9:05
    
Subjective indeed. I'm definitely not suggesting everyone go around and gaudily paste <kbd> everywhere just for S&Gs. That would just be asinine. But like the infamous Borg, resistance to crappy formatting is futile. –  ChristopherW May 25 '13 at 10:07
    
As for point 1, the user I flagged does this in all of his answers. It would involve a huge dedication of time to go through all of them and correct the markup (which was why I flagged the issue in the first place). Lets face it, if someone posted a question on SO with markup using kbd tags instead of span tags, for instance, there would be a flood of comments about how kbd tags shouldn't be used - this is really no different. –  James Donnelly May 25 '13 at 10:21
    
@JamesDonnelly: moderators don't have mass edit tools (except maybe for mass retags). It would be a huge burden on them too, and I don't see what they could do about this. Mod messages are supposed to be for "serious" offences. Edit the posts you find that contain this if it's important to you, and leave a nice edit summary or accompanying comment to "educate" the "culprit". –  Mat May 25 '13 at 10:29
    
What if there was moderator enforced "non revertable edits" for formatting issues such as this... if that makes sense. It would be more burdensome on the mods and it would really only benefit future posts unless someone wanted to go back in time to find bad formatted posts. –  ChristopherW May 25 '13 at 10:38
9  
-1 simply because I can't imagine why anyone would tell someone to just "leave it alone." If you see it, fix it. –  animuson May 25 '13 at 14:26
3  
If that's your prerogative, but like I said, in the grand scheme of things, it doesn't really matter. I'm going to go play with my kid now. –  ChristopherW May 25 '13 at 21:38
1  
Your definition of "fix" and mine are at odds -- if I format my post a certain way, it is because I wanted it formatted that way. –  Chris Sep 13 '13 at 15:18
3  
I gave -1 because I simply disagree with your stance. Simply turning a shoulder to problems just allows problems to proliferate - no matter how large or small they might be. –  crush Jan 10 at 20:37
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .