A liquid cartridge (30; 130; 230) attachable to a case in an attached posture, the liquid cartridge (30; 130; 230) comprising: a cartridge body (31, 32, 35) defining therein a liquid storage chamber, the cartridge body (31, 32, 35) having a front surface and a top surface (39, 141); a liquid supply portion provided at the front surface of the cartridge body (31, 32, 35) and configured to supply liquid stored in the liquid storage chamber to an outside of the cartridge body (31, 32, 35); an electronic board provided at the top surface of the cartridge body (31, 32, 35) and comprising an electrode group comprising at least three electrodes (65A, 65B, 65C), the at least three electrodes (65A, 65B, 65C) facing upward in the attached posture; a plate provided at the top surface of the cartridge body (31, 32, 35), the plate being positioned further rearward relative to the electrode group and protruding further upward relative to the electrode group in the attached posture, the plate having an attenuating surface (62L, 62R) configured to attenuate incident light traveling in a left-right direction (55, 56) perpendicular to a front-rear direction (51, 52); and a positioning member (43; 243) provided at the top surface of the cartridge body (31, 32, 35), the positioning member (43; 243) being positioned further rearward relative to the plate and protruding upward from the top surface of the cartridge body (31, 32, 35) in the attached posture, the positioning member (43; 243) having a positioning surface (151; 251) for positioning the liquid cartridge (30; 130; 230) attached to the case in the front-rear direction (51, 52), wherein when the liquid cartridge (30; 130; 230) is attached to the case, the plate is configured to be detected by an optical sensor configured to emit light traveling in the left-right direction (55, 56), and wherein the attenuating surface (62L, 62R) has a detection area, the light emitted from the optical sensor being configured to be incident on the detection area when the liquid cartridge (30; 130; 230) is attached to the case, the detection area being positioned further rearward and upward relative to the electrode group in the attached posture and positioned further frontward and downward relative to the positioning surface (151; 251) in the attached posture, and characterized in that the plate is fixed to the cartridge body (31, 32, 35) such that the detection area is immovable relative to the cartridge body (31, 32, 35). a cartridge body (31, 32, 35) defining therein a liquid storage chamber, the cartridge body (31, 32, 35) having a front surface and a top surface (39, 141); a liquid supply portion provided at the front surface of the cartridge body (31, 32, 35) and configured to supply liquid stored in the liquid storage chamber to an outside of the cartridge body (31, 32, 35); an electronic board provided at the top surface of the cartridge body (31, 32, 35) and comprising an electrode group comprising at least three electrodes (65A, 65B, 65C), the at least three electrodes (65A, 65B, 65C) facing upward in the attached posture; a plate provided at the top surface of the cartridge body (31, 32, 35), the plate being positioned further rearward relative to the electrode group and protruding further upward relative to the electrode group in the attached posture, the plate having an attenuating surface (62L, 62R) configured to attenuate incident light traveling in a left-right direction (55, 56) perpendicular to a front-rear direction (51, 52); and a positioning member (43; 243) provided at the top surface of the cartridge body (31, 32, 35), the positioning member (43; 243) being positioned further rearward relative to the plate and protruding upward from the top surface of the cartridge body (31, 32, 35) in the attached posture, the positioning member (43; 243) having a positioning surface (151; 251) for positioning the liquid cartridge (30; 130; 230) attached to the case in the front-rear direction (51, 52), wherein when the liquid cartridge (30; 130; 230) is attached to the case, the plate is configured to be detected by an optical sensor configured to emit light traveling in the left-right direction (55, 56), and wherein the attenuating surface (62L, 62R) has a detection area, the light emitted from the optical sensor being configured to be incident on the detection area when the liquid cartridge (30; 130; 230) is attached to the case, the detection area being positioned further rearward and upward relative to the electrode group in the attached posture and positioned further frontward and downward relative to the positioning surface (151; 251) in the attached posture, and characterized in that the plate is fixed to the cartridge body (31, 32, 35) such that the detection area is immovable relative to the cartridge body (31, 32, 35).