When you are asking a question about how to do something, the preferred way to ask would be to use "How do I..." (or "
How can I...", or "Where would I..."): How do I plant flowers in my garden?
How do I transpose flute music for clarinet?
How can I get my two-year-old to stop misbehaving?
Where can I get more information about asking questions in English?
If I am answering such questions in written form (say, on a blog, or in a book), a good way to summarize this information in a concise title is to use "How to..." (or "Where to..."): How to plant flowers in your garden How to transpose flute music for clarinet How to stop your two-year-old from misbehaving Where to get more information about asking questions in English Essentially, How do's are questions, and How to's are declarations.
In the title of a Stack Exchange question, either one can work.
How do I get a mailchimp list name and list i
d using php?
That works fine; you are essentially asking your question in the title of your question .
How to get a mailchimp list name and list
id using php That works fine, too.
You are essentially giving a title to what you hope will be a set of answers to your question.
ell.stackexchange.com/users/113/J.R.
How to do X is not a question but an NP, a clause which behaves like a noun † .
It has no subject-auxiliary inversion
I am asking you [how to do X].
Notice
the absence of a question mark.
How to do X works just fine as a title, however.
Tutorials are often called How-tos because they don't ask questions but answer them.
This module teaches you [how to do X].
How do I do X?
is the corresponding question.
It is marked as a question by subject-auxiliary inversion, made possible with do-support (the use of do to supply an auxiliary where one is needed).
This works just fine as a title, too.
(Practically anything works as a title.)
This matter has been often been treated here; here is a very early question on the subject.
†
Technically, a free relative clause or fused-relative clause .
Some linguists go even farther and distinguish this as an embedded question or open interrogative when it plays the semantic role of a question.
ell.stackexchange.com/users/32/StoneyB on hiatus
In English, questions are indicated in various ways, including word order.
In these cases, the question would be formed by switching the order of the subject and the verb but since they lack an auxiliary verb, they require do -support .
"How to..." is not a question, so if a question is written this way the easiest change (if there is no auxiliary verb) is to insert the necessary "do" and form the question in reference to the asker (referred to as "I").
That said, it's not absolutely necessary that the title of a "question" post actually take the form of a question , so sometimes a description of the problem (or even its expected solution) is used.
Similarly, a tutorial can be referred to as a "how-to" because it is not asking a question but instead providing instructions on how to do something.
ell.stackexchange.com/users/2274/Tyler James Young
I notice that you have a number of questions on your network profile that are "How to" with a question mark.
e.g.
How it's better to invoke gdb from program to print its stacktrace?
How to use git diff --color-words outside a Git repository?
How to get parent PID of a given process in GNU/Linux from command line?
This is ungrammatical, because "How to" is not a question .
There are two ways of correcting this: either remove the question mark, or change it to "
How do I...?
"
In other words, both How to use git diff --color-words outside a Git repository and How do I use git diff --color-words outside a Git repository? are fine.
Your editors could have chosen either option but they happened to choose the latter.
Personally, I think "How do I...?
" sounds more appropriate for the title of a question .
"How to" is a declaration and suggests that you are going to tell people how to do whatever it is.
So "How to" sounds more appropriate for the title of an answer to me.
(This is also why tutorials are called "How tos"
- they are telling you how to do something.)
However, that's a personal preference, and as J.R. points out , you can use either - both would be grammatically correct.
ell.stackexchange.com/users/3976/starsplusplus
People often use "How to" rather than "How do I" in Stack Overflow or Stack Exchange questions, because the word "I" gets a scary warning about the question being subjective and may be closed. https://meta.stackexchange.com/q/69769/38765
(Note: I deliberately used bad English in the last paragraph of the question)
As a side note, in general, please don't rely on Stack Overflow content as examples of high quality English!
ell.stackexchange.com/users/54/Andrew Grimm
A better title for this question would be: When do I write "
How to" instead of "
How do I"?
:D
ell.stackexchange.com/users/5601/justkidding
On the other hand  the edit  that fix mistype in "How to" got though community approval.  What is the rule about "How to" and "How do I"? Why are some tutorials called "How to"s?
Why do my "How to" questions often get renamed to "How do I"?
ell.stackexchange.com
<questions><headlinese><question-marks>
ell.stackexchange.com/questions/20730
ell.stackexchange.com/users/5584/Vi.
 "How to..." is not a question, so if a question is written this way the easiest change (if there is no auxiliary verb) is to insert the necessary "do" and form the question in reference to the asker (referred to as "I").   In other words, both  "How to use  git diff --color-words  outside a Git repository"   and    "How do I use  git diff --color-words  outside a Git repository?"  are fine. How to is a noun phrase that behaves like a noun, it is not a question.
How to is a noun phrase that behaves like a noun, it is not a question.