This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The validator does not currently detect a problem of a person putting HTML tags such as italic <i> in the text of the alt attribute of an image tag <img>.
There’s no good way to prevent this. An author may intentionally put a "<" character in an alt attribute for legitimate reasons; e.g., alt="Image showing '2 < 5'" or even "<img>" or whatever other markup; e.g., alt="Image showing an syntax-highlighted <img> element with the 'alt' attribute"