We had another earthquake last night in Los Angeles, this time a 5.1, and it came less than two weeks after a 4.4 earthquake. I don't mind the little earthquakes, but when we start getting up into 5s, I get a litlte nervous. (Side note: I held the belief that the smaller earthquakes relieve the tension along a fault line and reduce the likelihood of a larger event. The super useful and sometimes perception shattering earthquake.usgs.gov just told me that was untrue.) I actually didn't feel the 5.1 earthquake last night, but I jumped out of bed for the 4.4 and ran to a doorway. Then I thought, "Am I supposed to be standing in a doorway?"
Turns out, no, not so much. Doorways in modern buildings are generally not built super strongly, so unless you know it is a load-bearing doorway (and I would have no clue which doorway that was), standing under one isn't going to offer you much protection. The best thing to do is drop, cover, and hold on wherever you are.
If you can get under a heavy desk or table, make yourself as small as you can under that sturdy piece of furniture. Or you can crouch in an inside corner, covering your face and head with your arms. If you're outside, get into an open area, making sure to stay away from power lines, trees, streetlights, and buildings. If you're in a high-rise building, stay away from windows and elevators. If you're driving, as I was last night, stop as soon as you can without causing an accident, and stay in your car until the shaking stops. Do your best to stop in an area free of power lines, overpasses, trees, etc - basically, keep clear of anything that might fall on you if it were to collapse in an earthquake.