349

A good title helps your question get the attention it deserves. What goes into a good title?

Return to FAQ index

0

6 Answers 6

257

1. Make the topic stand out.

The purpose of a title is to attract people interested in your topic or who can give you an answer. People scan web pages quickly; make it easy for them to notice your question and understand what your question is about. Also keep in mind that some people may read questions via the RSS feed (Stack Overflow example), so they won't see tags.

2. Make it descriptive, but also to the point.

Make sure you describe your question or problem well enough so that readers get the gist of what it's about ("Problem with Java function" is not very descriptive). However, don't put every detail in your title... that's what the question body is for. Make your title descriptive, but also succinct.

For example, these articles discuss how people read web pages, based on using an eye tracking system to monitor users. For Stack Overflow-like pages, people read most of the first and second entries (the bars of the "F"), and then scan down the rest of the list, reading on average the first 16 characters of each line.

Reading Heatmap

3. Use proper grammar and write in question form.

Make sure you spell words completely and correctly, and form your titles in a way that they make sense to people reading them.

Likewise, expert opinion, Meta consensus, and Stack Overflow's Help Center describe how titles written with proper grammar, and in an interrogative form, are preferred.

4. Don't sweat replicating a tag keyword—if necessary.

The tags are orthogonal to the title. You may have to describe a part of your title using words that are already applied from your tags in order to distinguish your question from others and avoid confusion/ambiguity.

However, don't explicitly add tags to the title for their own sake. For example, don't start your title with a tag. See this post for a more detailed discussion of the relationship between tags and titles.

Some Good Examples

Here are some good titles, taken from the highest scoring posts across top sites.

Each of these summarizes the question adequately without introduce fluff or unnecessary verbiage, and, critically, provide context for exactly what the asker's question will be.
(Note that some questions are from very topic-specific sites like Ask Ubuntu or Physics)

  • Why is it faster to process a sorted array than an unsorted array?
  • Can I compute the mass of a coin based on the sound of its fall?
  • What is the cURL command-line syntax to do a POST request?
  • How do I undo the most recent commits in Git?
  • Is there a correct gender-neutral singular pronoun (“his” vs. “her” vs. “their”)?
  • How to unzip a zip file from the Terminal?
  • How do I install a .deb file via the command line?
  • How to determine if a bash variable is empty?
  • Why don't metals bond when touched together?
  • How do I deal with a compromised server?
  • In what order should the Star Wars movies be watched?
  • How to get bash or ssh into a running container in background mode?
  • How does IPv4 Subnetting Work?
  • How to upgrade a single package using apt-get?

Some Bad Examples

These titles, also taken from existing, poorly scored posts, are constructed of fragments, don't describe anything about the question, or lack useful context for what the asker's question actually is:

  • Please help me!
  • Python : Need Help About Statistics
  • PostgreSQL encrypted backups
  • Why it works like this?
  • About Computer Architecture
  • Constructing images using HTML markup?
  • DNS resolvation of a URL
  • Combine letter and numbers
  • PHP - Passing variables
  • BackgroundImage in css
  • Map Routing, a la Google Maps?
  • MySQL - Error In SQL Syntax
  • I can t write in pascal expression
  • 64-bit XML-RPC values?
  • Turning Linux USB power on and off?

5. Finally, be flexible

Different questions benefit from different styles of titles. Applying any single hard and fast rule is probably a mistake.

44
  • 94
    I can't vote on individual parts of the post (perhaps you should look at posting each idea separately?) but as for the titles - DON'T put tags in the titles - that's what the tags are for!
    – a_m0d
    Jul 29, 2009 at 7:03
  • 6
    If you look at the titles that are posted, you will notice that most titles already include one or more keywords. As an exercise, pick a question about some topic (Django, for example). You can find these easily by selecting the Django tag. You will see almost all of them have "Django" in the title. (And most of the ones that do not would benefit from it, lol!) Jul 29, 2009 at 7:32
  • 91
    If your question is How do I do X in Django?, should you put the tile How do I do X, and tag it Django? I think not, in that case the Django is an important part of the question, so put it in the title and tag it Django. Sometimes a little redundancy is not a bad thing...
    – Treb
    Jul 29, 2009 at 7:59
  • 7
    I don't think there's a simple anwser here. Titles should do what they do in pretty much any form of written information; act as a simple summary of the related content. People should be able to scan past your question, and quickly get a feel for what it's about. I don't know if you need to be any more specific than that. Sometimes that means you'll repeat tags in the title. Jul 29, 2009 at 8:01
  • 6
    Ok, better even: Django: How do I do X?...
    – Treb
    Jul 29, 2009 at 8:02
  • 17
    @a_mod, Jeff's point of view when he wrote is "You're supposed to look at the tags to tell what a question is". My point of view is "people don't always do what the site creator intends... and here's how to work with people's observed reading patterns to get your question viewed." Jul 29, 2009 at 9:08
  • 5
    @Mark Harrison: you might consider posting a suggestion that tags be included in the feed titles, rather than suggesting that users do so manually for the benefit of those who don't already subscribe to tag-specific feeds.
    – Shog9
    Sep 19, 2009 at 5:21
  • 16
    Writing tags in titles is redundant. We already have a tagging system that is clear, concise, consistent and indexable. All you're doing by writing, say, a pointless Python: at the start of your title is breaking SO's expectations (look in your titlebar), adding messy noise to your title, and winding me up. The "title" field is so named for a reason! Write the title, not some "topic". Nothing more, nothing less. SO is not a message board or chat forum. Jul 23, 2011 at 14:27
  • 21
    I don't understand why people have problems with the phrasing "How do I?", since that is still a question, and many, many questions can be phrased just fine that way. Aug 29, 2011 at 17:50
  • 19
    Needs less tag prefixes.
    – Shog9
    Aug 29, 2011 at 23:07
  • 27
    Almost all of your "good" examples end with a question mark but aren't a question. We're a question and answer site, and without a question, this looks really weird. Also don't forget that an actual question in the title reads more fluently, catches the eye when posted as links (e.g. to Twitter, as blog posts, on Hacker News, etc.).
    – slhck
    May 19, 2012 at 7:37
  • 11
    I don't see anything even vaguely confusing about the so-called bad examples. And since the author of this answer only offers a vague explanation as to why they think they're bad, the answer is itself even worse than unhelpful. Jun 29, 2013 at 9:21
  • 5
    Adding to the bad example list, possibly taking the #1 spot: "Hi i have question that keeps bothering me and i dont know if its stupid to ask this..but could you guys help me"
    – Jason C
    Nov 5, 2014 at 5:45
  • 9
    A lot of the comments and real world titles have shown how poor most of those "good" title actually are. Being a part of an FAQ, answers are subject to being edited for accuracy over time, not as a glaring hole of how wrong things are
    – random
    Feb 2, 2015 at 13:17
  • 12
    @MarkHarrison This post is severely outdated and no longer true. A lot of your good examples are in fact very bad examples of question titles for our network, by today's standards. Your answer received a bit of attention because it was brought up on Meta Stack Overflow that it's being linked in a notice and giving users bad advice.
    – animuson StaffMod
    Feb 3, 2015 at 16:18
125

While this is overall an excellent set of advice, I have some issues with a few of the titles:

  • Oracle: formatting number as xxx-xx-xxxx
  • Linux USB: turning the power on and off?
  • Oracle: how to UPSERT (update or insert into a table)?
  • Python: What OS am I running on?
  • X11: raise an existing window via command line?
  • XML-RPC: best way to handle 64-bit values?
  • X11: move an existing window via command line?
  • SQL: sum 3 columns when one column has a null value?
  • Oracle: best way to search over a range of values?
  • HTML: Constructing images using markup?
  • Postgresql: Inserting BLOBs at a high-rate?

I am not sure the rigid format

Tag: Question Title

Is a good one. The starts-with-tag-colon convention is a bit artificial and should be tweaked. Here's what I'd rather see:

  • formatting number as xxx-xx-xxxx in Oracle?
  • turning the USB power on and off in Linux?
  • how to UPSERT in Oracle?
  • raise an existing X11 window via command line?
  • best way to handle 64-bit values in XML-RPC?
  • move an existing X11 window via command line?
  • sum 3 columns in SQL when one column has a null value?
  • Best way to search over a range of values in Oracle?
  • Constructing images using HTML markup?
  • Inserting BLOBs at a high-rate in PostgreSQL?
  • What OS am I running on? (tagged Python)

(obviously all these questions would also be tagged with the right keywords)

To be clear, I think it is fine to duplicate the tags in the title, but only when they can be worked into the titles organically and conversationally.

If we're ritualistically appending tags to the front of the title, that doesn't feel like a tremendous improvement over a bunch of "How do I..." titles in the system, to me.

6
  • 3
    I don't like too the rigid formatting where a question have to start with the tag/technology, I prefer the discursive form.
    – Drake
    Jul 29, 2009 at 8:44
  • 3
    The tag issue is interesting. I read a lot of SO via an RSS feed which does not show tags, and this probably has shaped my opinion somewhat. Sep 2, 2009 at 6:12
  • 1
    Why would you rather see the “suffix” format? I prefer the prefix format because it means “Oracle” is the first word I see, so I can immediately skip the question, or “Python” is the first word I see, so I can pay more attention to the question (without having to visually parse the smaller “tags”). Mar 24, 2011 at 17:43
  • Or to put it another way: I think everyone agrees that “How can I format a number as xxx-xxx-xxx?” is a bad title… So why is the “question domain” (or “most relevant tag”?) more appropriate as a suffix (or inline) rather than a prefix? Mar 24, 2011 at 17:46
  • 14
    Writing the name of the technology into the title at all is completely redundant. Writing it as a pseudo-fixed-format "tag" is even worse. It comes from the days when categorisation was done on message boards without apt categorisation systems. SO has a consistent, indexable tagging system. There is utterly no need for writing tags in titles, at the start, middle or end, and it should be stamped out! Jul 9, 2011 at 23:19
  • 3
    Much agreed, I'm not a fan of prefixing the title. I tend to browse by tag, and if I'm interested by a title, I'll read the tags anyway. Jul 20, 2011 at 14:57
36

Instructions

The Good

Your title should be, in order of greatest to least importance:

  • Searchable. The point of Stack Exchange is not only to help the asker, but to others who may have the same problem as well in the future.
  • Descriptive. A searcher would like to know whether the question is another one of those "How to write a HTML regex parser?" questions or actually the "Why is parsing HTML with regexes a bad idea?" they are looking for.
  • Short. Put your 10-page essay in the post, not the title.
  • Precise. Tell us in
    • as few words as possible
    • as much as possible.
  • Interesting. How else will you make the Hot Questions list?

These points go together hand in hand. For example, a short and descriptive title is always searchable.

The Bad

Your title should not be/contain:

  • Programming language names. I do not need to see "How to fly using Python?". I can just check the tags for the . This is redundant information which just takes up ~20% extra of the question title. Additionally, Google search results already say "python - How to fly?"
  • Funny. Try not to be funny just for the sake of being funny. I am guilty of this too. If you excuse me, I will go have a serious conversation with Mr. Struct.
  • Ambiguous.
    • "Is this code OK?" If your question wasn't about code, you wouldn't be posting it here!
    • "Help with programming problem" This tells us nothing that we couldn't infer from the very fact that you're posting here.
    • "Help with homework problem plz" But fortunately, certain keywords are automatically rejected.

Examples

The Good

Single word requests, crosswords, and the fight against mediocrity
TortoiseHg Push
RegEx match open tags except XHTML self-contained tags
Why is subtracting these two epoch-milli Times (in year 1927) giving a strange result?
Is it possible to serve HTML pages with ServiceStack?
How to deep copy an irregular 2D array

The Bad

How Should Titles Be Capitalized?
Do I have to free an array inside a struct?
How to use a struct in C?
C Programming. How to deep copy a struct?
How do you make a deep copy of an object? (Any question containing the word 'Java' should be deleted, and its asker banned.)

The Ugly

Regular Expression…sql replace

7
  • White-space has to be added after the first link at the The Good section, so that the next link is also correctly highlighted. I don't have permissions to improve the post, hence a comment.
    – Rob W
    Nov 20, 2011 at 16:26
  • @RobW Thanks. :) You should have editing privileges (even 'non-users' do), but they have to be substantial (6 non-whitespace characters) and approved by a high-rep user. Nov 21, 2011 at 0:50
  • 7
    @menutoo I'm sorry but I can see why this wasn't the accepted answer! I have to completely disagree with you when you say that you should not put the programming language or any tag in the title. The good examples that you provided, for me are horrible and I hate questions that don't contain the programming language in the one. Looking at the tags is a pain most of the time, if the tags are even displayed, which they aren't on search engines and RSS feeds! Seeing 'Java' or 'Python' at the start of the big bold title that people read first is much easier and preferably
    – Andy
    Jan 29, 2012 at 15:34
  • 4
    If I were going to answer a question, and baring in mind that hundreds get asked ever hour, it would much easier for me to determine if I could answer the question if the programming language was in the title. I'm not saying all tags should be put into the title, or tags are of no use whatsoever because they are great - when they are available to see, which in some cases they are not. I also think your reaction to titles containing the word 'Java' is a little uncalled for. Why do you hate them so much?
    – Andy
    Jan 29, 2012 at 15:41
  • 4
    @Andy Personally, I find it quicker to look at the tag. BTW, have you ever tried using the favorite/ignored tags feature? That way, there's not as much of a need to look at the tag, but just the title. And the page is already titled "tag - title", so Google would display the language twice, redundantly. If you want it so that SO displays "tag - title" on the homepage -- that's a feature request you can make, although personally, I would not like that. Repeating the same information over and over, however, is definitely wrong. Jan 29, 2012 at 23:25
  • 1
    @muntoo I do use the favourite/ignored tag feature on SO and I agree that it is very useful - that's why I was very careful to say that tags aren't of any use whatsoever. However, my points still apply. Maybe search engines were a bad example, but certainly for things like RSS feeds putting the programming language in the question can be helpful. Also, and I know it's not a very strong argument, a prime example of when the programming language or similar would be more convenient is your 'Good Examples' of titles. To someone looking at links on a web page, that may not full explain the...
    – Andy
    Jan 30, 2012 at 16:53
  • 1
    content on the destination web page, those title are completely useless. Now, I know this situation is not likely to occur very often but it's still a point! Finally, and the main point that Mark also picks up on is the fact that the title is one of the first things that a user looks at on the page, so I would argue that it should be articulate as possible, and at least contain the programming language, if the question regards programming! You still haven't answered by question though, why are you targeting Java so much in perticular?
    – Andy
    Jan 30, 2012 at 16:56
13

(Jeff raises some good points. This is a followup to his note, since I can't edit his post, and I need a bit more formatting that what a comment provides.)

  1. Absolutely correct about rigidly adhering to a formula for titles. Do what makes sense.
  2. I didn't realize I had picked so many topic: lines. There are certainly other ways to write good questions.

  3. Many of Jeff's alternative are fine titles when considered in isolation.

However, if you want people to pick out your post from a list of other titles all competing for reader attention, it pays to note that the people in the study were scanning on average the first 16 characters of the titles.

So, it's interesting to truncate your title to 16 characters and see how they hold up. If you put something that interests a reader in the first 16 characters, there's a pretty good chance the rest of your title will be read. Once someone has clicked through to your question it's almost assured your question will be read. The main job of the title on the questions page is to get the reader that far.

  • formatting numbe
  • turning the USB
  • how to UPSERT in
  • raise an existin
  • best way to hand
  • move an existing
  • sum 3 columns in
  • Best way to sear
  • Constructing ima
  • Inserting BLOBs
  • What OS am I run

  • Oracle: formatti

  • Linux USB: turni
  • Oracle: how to U
  • Python: What OS
  • X11: raise an ex
  • XML-RPC: best wa
  • X11: move an exi
  • SQL: sum 3 colum
  • Oracle: best way
  • HTML: Constructi
  • Postgresql: Inse
  • Python: What OS
13
  • 2
    Tags on questions help with the scanning. Plus, with the ignore feature, irrelevant topics are faded of squeezed out of eyeball attention. Not all programmers and sysadmins have ADHD do they?
    – random
    Jul 29, 2009 at 9:02
  • 12
    I'd argue you should be interested in the TOPIC more than the technology. In other words, a proper cross join and string formatting is not Oracle specific. Part of the intent of Stack Overflow is to rub shoulders with people in related disciplines and realize that, hey, we have stuff in common! Less reason to hate {not my technology stack}. Jul 29, 2009 at 9:08
  • 6
    that said, I just want to reiterate that the word Oracle should be in the title, but the cross-platform, cross-discipline nature of SO does not require that it be at the beginning. Jul 29, 2009 at 9:09
  • Jeff, both good points. And +1 for noting that people who spell "SQL" as "Oracle" are probably depriving themselves of some good information. Jul 29, 2009 at 9:12
  • 1
    Topic focus is good, but it does help if you narrow out platforms/tech you have no idea about or just aren't in your field of vision for the time being. Getting dirty with the other tags is great, but some of us tepid array walkers like to play with the other tags one at time after we're comfortable being horrible in our first coding language.
    – random
    Jul 29, 2009 at 9:16
  • 7
    interestingly, Google forced our hand on this, so the de-facto default is "TAG - Title" unless the tag does appear organically in the title. See webmasters.stackexchange.com/questions/6556/… Jan 10, 2011 at 8:33
  • That's very funny, to be justified by Google. I'll be sure and mention it on my cover letter if I ever send them a resume! Jan 10, 2011 at 12:49
  • 1
    @Mark: That the <title> tag contents have been made to be {First Tag} " - " {Title Contents} does not support your assertion that every {Title Contents} should have an inflexible, inconsistent and non-indexable "tag" at the start of it. If anything, this backs up the usefulness of relying on the proper tagging system: the site is free to visualise question tags in the proper manner, because they are represented properly and atomically in the database. Jul 9, 2011 at 23:24
  • 1
    Hi Tomalak, I think we're in agreement. Note my final suggestion: "Finally, be flexible -- Different questions benefit from different styles of titles. Applying any single hard and fast rule is probably a mistake." Jul 12, 2011 at 0:06
  • 3
    -1 tags should not be part of the title. Aug 29, 2011 at 21:12
  • 3
    it depends; if you are already browsing by the [oracle] tag, then putting, say, "ORACLE: blah blah foo bar" is kind of harmful. I do like and fully support tags worked organically into the title, though, but I really worry that seeing a lot of "[tag]: title" sends a dangerous message. Aug 29, 2011 at 22:30
  • 12
    Worth noting the difference between working a "tag" into the title, and working the subject of the question into the title. Because it's the latter that we really, really want. If your title is vague or hard to understand without some crappy prefix, your title sucks - with or without the crappy prefix.
    – Shog9
    Aug 29, 2011 at 22:34
  • 1
    wow , so many criteria for good tittle
    – fairybet88
    Apr 30, 2015 at 2:35
10

One simple rule: STATE YOUR BUSINESS

A question title should be a one-sentence summary of the problem at hand, that sets the question apart from other questions. Nothing more, nothing less. The purpose of a title is to allow whoever sees it to know what the question is generally about, without having to read the question body as well, especially when browsing through question lists. Try to capture what it is that you have a problem with, to as large an extent as reasonable within one line. Don’t worry if being specific makes the title long-winded; being wordy is better than being vague, and and as long as you fit within the length limit, the title should be okay. An exhaustively descriptive title is ideal, but if you cannot manage it and there’s a detail that you cannot fit within, you can always put it in the question body. However, don’t bury the lede and resist the temptation to write clickbait. Don’t write titles like Charlie White.

Good title formats are:

  • How do I ⟨accomplish X⟩?
  • When I do ⟨X⟩, ⟨P happens⟩, but when I do ⟨Y⟩, ⟨Q happens⟩. Why?
  • What is an ⟨X⟩?
  • Is there a difference between ⟨X⟩ and ⟨Y⟩?
  • Is it correct that ⟨claim P⟩?

where ⟨X⟩, ⟨Y⟩, ⟨P⟩ and ⟨Q⟩ should be noun and verb phrases referring to specific things, not vague determiners; i.e. no How do I do this? or What is this thing?.

Ideally, a question should be possible to answer based on the title alone (but even then, the question body should probably not be empty). Take a look at Quora: over there, each question is a one-liner, there are no long-form question bodies, and no one seems to mention that among their top complaints about that site.

More specific advice

(Many examples below are specific to Stack Overflow, but the general advice should apply generally.)

If you are asking about a piece of syntax featuring a punctuation character, it’s good practice to include both the character itself and its name written out in full. The latter is for the sake of search engines, which sometimes make searching for punctuation inconvenient (if at all possible); the former for the sake of non-native speakers who may fail to recognise the character by its name. As such, prefer ‘What does an exclamation mark (!) mean before a logical expression?’ to ‘What does ! mean?’.

Avoid putting the following in titles:

  • Salutations and greetings (hello stackoverflow, hey everyone, hi guys, thanks in advance, etc.): greetings take space and don’t convey useful information. Q&A pairs are meant to be a low-context, impersonal public medium, focused on the problem at hand, not a communication between specific people. It is standard practice to remove greetings from the beginning of the post; they have no place in titles either.
  • Begging and rushing: expressions meant to evoke sympathy are often annoying to other users and therefore counterproductive. They should not be placed either in the title or in the question body.
    • please help, please explain, etc.: Everyone asking a question is looking for help or explanations. You are not saying anything we don’t already know. Such phrases do not add anything to the question.
    • I am a beginner, I am just a noob, I am a learner, etc.: Quite a few people here are beginners. If anywhere at all, mention it in the question body, preferably near the end; it may help answerers calibrate the depth of explanation. Remember that even if you are a newcomer, you will still be expected to know at least the fundamental vocabulary of the thing you are attempting to learn: the difference between loops, variables and functions, expressions and statements, declarations and definitions, etc. Otherwise, you will probably not be able to understand even the most elaborate answer. To put it more bluntly: even newbies are expected to be literate in the subject they are asking about.
    • I am out of ideas: If you have actually exhausted every possibility known to you, you have done your due diligence. This is the very least of what you’re expected to do before asking. It goes without saying, so mentioning it is redundant.
    • I need this ASAP: Your deadlines are your problem. The answerers are volunteers; they have no obligation to respond within any specific time frame. To demand so is very rude. Rushing answerers has no place anywhere in the question.
  • Emoticons (:(, 💩): Just don’t. Like begging, it will be perceived as emotionally manipulative and therefore poorly received.
  • Vague and redundant phrasing: titles should be as specific and descriptive as reasonable. You are not writing a suspense novel; putting spoilers in the title is not only perfectly fine, it is expected and encouraged. However, don’t repeat things we already know by virtue of you asking a question here. Describe what you are attempting to do in the specific place you encountered a problem.
    • I don't know, I have a problem, an issue, trouble, strange behavior, understanding, can anyone help me: If you didn’t have a problem you don’t know a solution for, you wouldn’t be asking. Say what your problem is.
    • question about: We already know you are asking a question. Don’t waste words on that: title space is scarce. Write in the title what is the question.
    • easy problem, basic question: There are lots of easy questions asked here, and it will be just as apparent that your question is easy if you just say what it is. Don’t waste other people’s time by requiring them to click through to find out.
    • a few questions, a couple problems: If your title says that you have multiple questions, then not only is your title bad, the question post itself probably needs to be closed as lacking focus. Unrelated questions should be asked separately. Multiple questions in one post are only acceptable when they all ask about related aspects of a single problem (more specific than ‘my program doesn’t work’). Even in that case, you should have the title describe that problem instead of wasting characters on stating that you have multiple questions.
    • i have a doubt: Using ‘doubt’ as a noun meaning ‘question’ (as in, when asking about something) may be common in Indian English; it is however not only superfluous (see above), but also likely to be misunderstood as this meaning is not recognised in other dialects of English. Kindly do the needful and omit the word.
    • weird, strange, broken, bizarre, confusion, how is this possible, etc.: If what you saw made sense to you, you wouldn’t be asking a question. Be specific: say what you expected to happen.
    • doesn’t work, fails: Again, be specific. Explain the way it fails to do what you wanted. Alternatively, describe circumstances in which it did work, and how it differs from those in which it doesn’t. At the very least, explain precisely what failed.
    • this word, this phrase, what does this mean?, what is the difference between these two?, etc.: Mention the specific word, phrase or symbol; or at least, mention where you encountered it.
    • my code, my program, this program, this thing: As a rule of thumb, if your title contains a demonstrative or possessive pronoun (‘this’, ‘these’, ‘my’), it’s probably not detailed enough. Try to describe briefly what your code is attempting to do, in the specific fragment where you encounter the problem. This is not always easy to squeeze into one sentence, but at least try to do so anyway. If the snippet you are asking about is very short (fewer than 20 characters), you can even include it in the title directly. (That said, ‘How can I ⟨accomplish something⟩ in my code?’ is a pretty acceptable title.)
    • an error, this error: Don’t just say ‘error’; describe the kind of the error or the error code. Explain also the circumstances in which you got this error. The detailed error message should at the very least appear in the question body.
    • my other question: Don’t assume the reader is familiar with any other question of yours. Link to the other question in the body, if it is relevant. Preferably, however, make each question you ask stand on its own.
  • Spurious Capitalization (What Is The Difference Between…): if it’s not a proper noun (and has no other orthographic reason to be capitalised), do not capitalise it. You may confuse readers into thinking that the title uses a proper noun where it doesn’t. Writing a title in all-caps is right out: it’s just as rude as anywhere else on the Internet.
  • Pseudo-tags ([C++], (Windows), React |, [SOLVED], etc.): don’t put the technology you happen to be using, or the specific subject area where your question belongs, as a disjointed blob in the title. Tags already exist for the purpose of categorising questions; use them instead. Don’t mark a question as resolved in the title either; instead, mark an answer as accepted with the green check mark. If you came upon a solution on your own, you can write your own answer and accept that.
  • Keyword dumps (Windows path Python): A question title should be a complete grammatical sentence with a subject and a predicate (or at least a nominal sentence/gerund phrase). Don’t merely list what technologies, methodologies or techniques you’re using: describe what you are attempting to do with them. Again, to merely categorise the question, use tags. As a rule of thumb, if it doesn’t mention any action and doesn’t ask what something is, it’s probably a bad title.
  • Error dumps (TypeError: undefined is not a function): a specific error may appear in many different circumstances that have little to do with each other. The title should describe those circumstances, not merely the error message itself.
  • Your ultimate overarching goal (I am writing a webapp, TypeError in my Discord bot): a good question will be useful in many different circumstances, not just the original asker’s: someone else from you can run into the exact same problem while building something entirely different from you. The title should describe the single problem you are having, not the application of whatever you’re building. Those contextual circumstances belong in the question body only, if anywhere. Often they are entirely redundant; try to omit them. (If the particular technique you are trying to apply seems unorthodox, ill-advised and/or ill-motivated, you may be asked why you chose it; but this information doesn’t belong in the title either way.)
  • Jokes. Say “you must be fun at parties” all you want, but yes, I really mean it. As far as I have seen, attempts at humorous or whimsical titles almost always come at the expense of clarity, which is paramount here. Another answer’s “Mr. Struct” question is probably the poster child here.

My jar of awful question titles

I have collected a list of questions with especially bad titles below. Many of them are now deleted, and therefore invisible to most users; can you tell what they were asking? Now imagine all questions looked like that. Would you be compelled to answer them? If you wanted to return to one of them, would you know what to look for?

Keep in mind, though: just because a title is not quite as awful as the above, doesn’t mean it’s actually good.

3
  • 1
    Re "Take a look at Quora". I don't think they compare. Quora was described as provoked blogging, and it was even more true after they removed question details. Dec 3, 2023 at 23:20
  • One person asks a question, another answers. It’s a Q&A site. Pretentious descriptions don’t matter. Apr 9 at 8:59
  • Answers to one-sentence questions without any context whatsoever may be interesting, but they are not useful. The answer is always "it depends". Apr 16 at 0:13
-10

Use full grammatically correct questions

  1. Write every title as a full complete grammatically correct question sentence, and finish it with question mark ?

    It makes the questions clearer, and more attractive.

    Otherwise, we are writing in semi defined "title-language" that no one really speaks.

  2. Repeat key tags in the title because:

  3. Use How to whenever it applies, don't use:

    • How do I: yes, since you are asking, we know it is you :-)
    • What is the best way to: people don't usually not want the best way to

Sample good title that follows all above rules:

How to print an integer as hexadecimal in C?

This style is also currently supported by the page: https://stackoverflow.com/help/how-to-ask (archive):

Spelling, grammar and punctuation are important! Remember, this is the first part of your question others will see - you want to make a good impression. If you're not comfortable writing in English, ask a friend to proof-read it for you.

Bad: C# Math Confusion
Good: Why does using float instead of int give me different results when all of my inputs are integers?
Bad: [php] session doubt
Good: How can I redirect users to different pages based on session data in PHP?
Bad: android if else problems
Good: Why does str == "value" evaluate to false when str is set to "value"?

This style is further supported yet again by "Title" section of the new ask question wizard from as of 2019-04 https://stackoverflow.com/questions/ask?guided=true

Imagine you’re asking a question to another developer.

For example:

Say “Is there an R function for finding the index of an element in a vector?”

Don’t say “Please help with R”

Say “How to fix ‘Headers already sent’ error in PHP”

Don’t say “PHP error: Why isn’t this working?”

It seems that SO devs agree with me at least then ;-)

5
  • 1
    Can you add an example of a question with "How to"? It is not clear whether or not you recommend a question mark in those. Mar 9, 2019 at 12:52
  • 1
    @PeterMortensen yes, my intention was that the ? should be used in those due to rule number 1. I've added an example to clarify further. Mar 9, 2019 at 19:03
  • 1
    Many questions can do just fine without a full grammatical title. There's no reason to insist on it for all questions. Repeating tags in the title is usually redundant, since the site adds them to the page's HTML title anyway. Starting a question with "How to" would be ungrammatical, anyway (Yes, your first example is an ungrammatical sentence fragment.), so you have some contradictory advice here. The examples in your final block quote are differentiated primarily by specificity; the "Don't say" examples are vague and provide no detail about the nature of the question.
    – jpmc26
    Jun 28, 2019 at 7:19
  • 1
    @jpmc26 thanks for feedback (Y) Jun 28, 2019 at 7:24
  • 1
    Your example is contradictory to your first suggestion. "How to print an integer as hexadecimal in C?" is not a "full complete grammatically correct question sentence". It lacks an auxiliary verb. Also, "don't use: How do I" is kind of funny given the title of the meta post you're answering. The title of the "How do I" meta post you're answering is the one that is a ""full complete grammatically correct question sentence". Jul 11, 2023 at 11:04

You must log in to answer this question.

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