W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2003

ALT as required attribute

From: Terry Thompson <tft@u.washington.edu>
Date: Mon, 3 Feb 2003 09:15:37 -0800
To: <w3c-wai-ig@w3.org>
Message-ID: <000201c2cba7$df009710$55cca08c@MH350Athompst3>

I'm trying to grasp the implications of ALT being a required attribute
in various if not all DTD's of both HTML and XHTML. 

If I load the following code in Netscape 7, IE 6, Opera 6.01, or Amaya
7.2, each of these browsers is forgiving of my having omitted an ALT
attribute from my IMG element. This same code doesn't validate, but why
should I be concerned about validation, if so many user agents seemingly
aren't enforcing the requirement? 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <title>No ALT Example</title>
    <h1>The following image has no ALT:</h1>
     <img src="something.jpg" />

Thanks for any clarification! 

Terry Thompson
The University of Washington
Email: tft@u.washington.edu
Voice: 206-221-4168
TTY: 206-685-3648
Fax: 206-221-4171
Received on Monday, 3 February 2003 12:17:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:13 UTC