The molecules of both methyl 4-[2-(4-chlorobenzoyl)hydrazinyl]-3-nitrobenzoate, C15H12ClN3O5, (I), and methyl 4-[2-(2-fluorobenzoyl)hydrazinyl]-3-nitrobenzoate, C15H12FN3O5, (II), contain an intramolecular N-H···O hydrogen bond, and both show electronic polarization in the nitrated aryl ring. In both compounds, molecules are linked by a combination of N-H···O and C-H···O hydrogen bonds to form sheets, which are built from R4(3)(18) rings in (I) and from R4(4)(28) rings in (II). In each of methyl 3-phenyl-1,2,4-benzotriazine-6-carboxylate, C15H11N3O2, (III), and methyl 3-(4-methylphenyl)-1,2,4-benzotriazine-6-carboxylate, C16H13N3O2, (IV), the benzotriazine unit shows naphthalene-type delocalization. There are no hydrogen bonds in the structures of compounds (III) and (IV), but in both compounds, the molecules are linked into chains by π-π stacking interactions involving the benzotriazine units. The mechanism of chain formation is the same in both (III) and (IV), and the different orientations of the two chains can be related to the approximate relationship between the unit-cell metrics for (III) and (IV).