A density measuring device includes a moving member that can be moved in a
liquid, a light emitting member and a light receiving member that
receives light emitted by the light emitting member. A gap part in which
the moving member is disposed in a path of light emitted from the light
emitting member can be moved. A density measuring unit measures the
density of the liquid based on the result of output of the light
receiving member for a case where the moving member is located in the
path of light emitted from the light emitting member and a case where the
moving member is not located in the path of light emitted from the light
emitting member.