img
element cannot have alt
attribute value that is the same as its src
attribute.
Question | Is this Alt text appropriate for the image? |
---|---|
PASS | Alt text is appropriate for the image. |
FAIL | Alt text is not appropriate for the image. |
img
element and compare its alt
attribute value to its src
attribute value.alt
attribute value and the src
attribute values are expected to be different.alt
attribute value is appropriate.src
attribute.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> <html lang="en"> <head> <title>OAC Testfile - Check #2 - Negative</title> </head> <body> <img src="rex.jpg" alt="photo of rex the cat"/> </body> </html>
src
attribute.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> <html lang="en"> <head> <title>OAC Testfile - Check #2 - Positive</title> </head> <body> <img src="rex.jpg" alt="rex.jpg"/> </body> </html>