Room23 Posted November 14, 2005 Share Posted November 14, 2005 Ok, I started with HTML today, so I figured I might try to do this the right way, so I validate very often to check for errors. But now I even get errors when I copy the code from the examples Here is the code i try to use: <p>An image from W3Schools:<img src="http://www.w3schools.com/images/ie.gif" width="73" height="68"></p> The picture itself is showing, can anyone please help?Here is the error msg: Error Line 12 column 72: required attribute "ALT" not specified....ols.com/images/ie.gif" width="73" height="68">The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Thanks for all help! Link to comment Share on other sites More sharing options...
F-Man Posted November 14, 2005 Share Posted November 14, 2005 Required attribute "ALT" is not specified.Should be <img src="http://www.w3schools.com/images/ie.gif" alt="Alternate text" width="73" height="68"> Link to comment Share on other sites More sharing options...
maelstorm Posted November 14, 2005 Share Posted November 14, 2005 The code you have posted seems to be working fine when I tried. you may want to check out this site for more details abt img tag.http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG Link to comment Share on other sites More sharing options...
maelstorm Posted November 14, 2005 Share Posted November 14, 2005 Required attribute "ALT" is not specified.Should be <img src="http://www.w3schools.com/images/ie.gif" alt="Alternate text" width="73" height="68"><{POST_SNAPBACK}> Hi F man when I tried without alt attribute it seems to be working fine, I dont think its a required attr. though its mentioned so in w3c recomendation Link to comment Share on other sites More sharing options...
Room23 Posted November 14, 2005 Author Share Posted November 14, 2005 Thanks guys! love you Link to comment Share on other sites More sharing options...
Jonas Posted November 14, 2005 Share Posted November 14, 2005 Depending on which doctype you use, you might wanna close the image tag.html: <img src="..." alt="...">xhtml: <img src="..." alt="..." /> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now