According to the octet rule, an element attains stability if it has the outer shell filled to its capacity. In such cases, the element achieves a state of lowest possible energy and hence, is most stable. According to the octet rule, an element needs to have 8 electrons in its outer-most shell to attain stability or nobility. This is the characteristic property of nobles gases which have 8 electrons in their outermost shell (except for helium which has 2 electrons). Hydrogen and helium are rare cases. They only have a single shell and hence, can only store a maximum of 2 electrons. Such elements tend to achieve duplet (or 2 electrons in the outer shell).