The cobra snake bodies are very soft so that it is should be impossible for them to raise their heads high. However, in an aggressive situation, this snake can raise its neck and head, the height of which depends on how emergency the situation is. We hypothesized this mechanism happens because the cobra can control the effective elastic modulus of its body by controlling the pressure of air inside the respiration system. Direct measurement to the cobra bodies, either living or freshly killed, and simulation were performed to justify this hypothesis. The simulation demonstrated the neck height increases with the effective elastic modulus according to a scaling relationship. This work may provide a physical foundation underlying the mechanical properties of slender animals