I suggested an edit for this answer which only changed the quoting for the text to be used for a web search. (The suggested edit has been accepted.) The original used parentheses for quotation; I changed this to <code>. Using <kbd> might be more semantically correct as such is keyboard input rather than a code fragment, but the styling used by SE for <kbd> seems excessively jarring.

For ordinary quotations, quotation marks would be used and there are common methods for handling quotation nesting. However, using "search text" and 'extra "search text"' may be confusing when the search text itself does not contain any quoted text because the reader may assume the quotation is part of the search text since '"search text"' seems awkward.

Although this could probably be made a question on the main site, I am asking specifically for advice here at Writers.

1 Answer 1


I would use the keyboard tag, or put the text in quotes. Using the quotation tag is probably not appropriate since that's reserved mostly for quoting existing text.

As for the keyboard tag's styling: That's a design decision, and implemented by stack exchange. If you think it should be changed and can present a good case for it, you can ask for it here. The stack exchange folks come around here from time to time. However, since this site is still using the beta styling, I think they'd rather wait until such a time as the site is launched.

  • 1
    I sympathize with semantic use of HTML, but styling is a significant factor for human readers. (I doubt search engines exploit <kbd> currently because it is so rarely used, not even when text is describing explicit keyboard input.) The use in my question is also semantically invalid. Using <kbd> would be more correct, but then a different phrasing would have been necessary to show the styling differences. I suspect SE chose the styling for <kbd> because such fits with "click <kbd>OK</kbd>" (not technically keyboard input, but semantically similar). Jun 19, 2014 at 18:55
  • I would be inclined to suggest that SE allow some limited declaration of class attributes to allow some styling choices, but I suspect that such a suggestion would be rejected fairly quickly. Even the providing of an id attribute for headers has not been accepted even though such would allow linking to a section of a long answer. Jun 19, 2014 at 18:55

You must log in to answer this question.

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