A liquid cartridge (30, 230, 330, 430, 530, 630, 730) configured to be inserted into an attachment portion in an insertion direction crossing a gravitational direction and attached to the attachment portion in an upright posture, the liquid cartridge comprising: a housing (31, 231, 331, 431, 531, 631, 731) defining a storage chamber therein; a liquid passage in communication with the storage chamber and extending frontward in the insertion direction from the storage chamber in the upright posture; a sealing member provided in the liquid passage; a circuit board supported by the housing and comprising a contact configured to make contact with an electrical contact of the attachment portion in an attached state of the liquid cartridge to the attachment portion, the contact of the circuit board facing upward in the upright posture; and an engagement surface (91A, 293A, 393A, 493A, 695A, 791A) positioned below the liquid passage in the upright posture, the engagement surface being configured to engage the attachment portion to restrict the housing from moving rearward in the attached state, wherein: in the upright posture, the liquid passage is positioned closer to the engagement surface than the circuit board is to the engagement surface with respect to a vertical direction, and the circuit board and the engagement surface are positioned rearward relative to the sealing member in the insertion direction; the sealing member is elastically deformable, the housing (31, 231) has an upper surface (39A, 239A) defining a prescribed location (45, 245) thereon in the insertion direction in the attached state, and the housing is pivotally movable about a pivot center (44, 244) where the engagement surface abuts on the attachment portion, the circuit board has a portion positioned in alignment with the prescribed location in the insertion direction in the upright posture, the prescribed location (45, 245) is coincident with a point of tangency between the upper surface (39A, 239A) in the attached state and a locus of pivoting of the housing about the pivot center (44, 244), and a portion of the circuit board is positioned vertically above the pivot center. a housing (31, 231, 331, 431, 531, 631, 731) defining a storage chamber therein; a liquid passage in communication with the storage chamber and extending frontward in the insertion direction from the storage chamber in the upright posture; a sealing member provided in the liquid passage; a circuit board supported by the housing and comprising a contact configured to make contact with an electrical contact of the attachment portion in an attached state of the liquid cartridge to the attachment portion, the contact of the circuit board facing upward in the upright posture; and an engagement surface (91A, 293A, 393A, 493A, 695A, 791A) positioned below the liquid passage in the upright posture, the engagement surface being configured to engage the attachment portion to restrict the housing from moving rearward in the attached state, wherein: in the upright posture, the liquid passage is positioned closer to the engagement surface than the circuit board is to the engagement surface with respect to a vertical direction, and the circuit board and the engagement surface are positioned rearward relative to the sealing member in the insertion direction; the sealing member is elastically deformable, the housing (31, 231) has an upper surface (39A, 239A) defining a prescribed location (45, 245) thereon in the insertion direction in the attached state, and the housing is pivotally movable about a pivot center (44, 244) where the engagement surface abuts on the attachment portion, the circuit board has a portion positioned in alignment with the prescribed location in the insertion direction in the upright posture, the prescribed location (45, 245) is coincident with a point of tangency between the upper surface (39A, 239A) in the attached state and a locus of pivoting of the housing about the pivot center (44, 244), and a portion of the circuit board is positioned vertically above the pivot center. in the upright posture, the liquid passage is positioned closer to the engagement surface than the circuit board is to the engagement surface with respect to a vertical direction, and the circuit board and the engagement surface are positioned rearward relative to the sealing member in the insertion direction; the sealing member is elastically deformable, the housing (31, 231) has an upper surface (39A, 239A) defining a prescribed location (45, 245) thereon in the insertion direction in the attached state, and the housing is pivotally movable about a pivot center (44, 244) where the engagement surface abuts on the attachment portion, the circuit board has a portion positioned in alignment with the prescribed location in the insertion direction in the upright posture, the prescribed location (45, 245) is coincident with a point of tangency between the upper surface (39A, 239A) in the attached state and a locus of pivoting of the housing about the pivot center (44, 244), and a portion of the circuit board is positioned vertically above the pivot center.