In Canada, a programmer is certainly not an engineer. And for Canadians going for a TN visa to work in the US, programmers are not allowed. Usually they try to slip in as 'Systems analysts' or craft the job/acceptance letter to fit under an engineering discipline.
Software Engineers are engineers in Canada. A self taught programmer doing css/html is not an engineer.
I'd simply qualify someone as an engineer, iff they successfully graduated from recognized university from an accredited Engineering program. And a second possible scenario is if someone's managed to pass all the Professional Engineer's examinations independently (rare).