Deductions & credits

Yes, for any month, as dmertz said above, that you have HDHP coverage on the first of the month (and no conflicting coverage), then you can contribute to your HSA, subject to the annual HSA contribution limit.

 

Your HSA is not "attached" to your HDHP policy; your HSA is an independent financial account similar in many ways to an IRA - that is, it belongs to you, not your employer. So as long as you have HDHP coverage from any source (employer, COBRA, even self), you can use that month to count towards calculating your annual HSA contribution limit (see dmertz's comment above). Whether or not you can contribute depends on how close you are to that limit at any given time.