queenpictoria Posted July 21, 2008 Share Posted July 21, 2008 Hello. I am new at CSS but have four years in HTML. In HTML, one can use the "alt tags" which are found after URL of the pictures and images. With CSS, is the "alt tag" still used in the code after each image? If so, where? Are the images placed in the css document without any "alt tags"?? What happens if the picture or image does not come up with no "alt" title to describe the image. What then? The "alt tags" are also a great way to embed keywords into the document. what is the advantage to CSS in this way? I am very new to CSS and believe I need this answered so I can move on. Does this make sense to anyone? Thanks! queenpictoria Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted July 21, 2008 Share Posted July 21, 2008 The alt tags work as they did in HTML. All you do in CSS is style how the image will be displayed. The link to the image remains the same. So if you have no alt text nothing will display. Quote Link to comment Share on other sites More sharing options...
TCH-Dick Posted July 21, 2008 Share Posted July 21, 2008 You can not set the ALT attribute for CSS images nor do you need to. CSS images should not be used for images that contain content, they are best used only for design/layout images. I find this acceptable, since accessibility guidelines recommend an empty ALT attribute for images that are not called via CSS and are purely for layout(with the expectation of transparent and images). With that said, if you use the alt attribute as intended with meaningful descriptions then there is nothing to worry about with the SEO needs. (content, content, content) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.