A stem is the thin, vertical line in a note that connects to the notehead, and to the flags if any. All notes have a stem except for whole notes and breves. The length of a stem should be equal to that of an octave on the staff, but if the note is on a ledger line more than an octave away from the middle line of the staff, the stem will be elongated to reach the middle line. The stem can be above or below the notehead depending on the position of the notehead on the staff. If above, it is tangent to the notehead's right side, and if below, it is tangent to the notehead's left side.