I wish to add some text prior to the number given to a subsection, e.g.:
Task 1.1 Blablabla ... Task 1.2 Blablabla
To add text before the section, you can use:
or for subsection you can use:
Peter's answer has the disadvantage of printing the text you put before subsection numbers in references to the subsections and in the ToC, as well.
To avoid that, instead of renewing the meaning of
If you want similar behavior for sections, you can use something like
If you also want that word before subsection numbers in the ToC, add the following code to your preamble