whats the better way to put images, declare de parameters in the css like width, height ... and in the html put something like this <a href="www.mysite.com?phpMyAdmin=4594f30712f4fabaff6997416810f3f2" title="bla bla "><img src="image.jpg" width="222" height="289" alt="bla bla"/></a> OR!!!! put with the parameters of css with a background: url(image.jpg);
WHATS THE DIFFRENCE??? i see a adventaje in the html for put title to image but????????? please help me! thanks
If you put images in the background it saves a little bit of markup in the html. If you want the same image in several places this can be handy. You can, of course, have background images with text on the top, the original intention of the property, I think.
If you put images in the foreground, you can add a link so you can click on them; you can add inline style, for example add ems after the pixel width and height so the image will resize if you change the basic font-size of the page; you can also position an image of a heading over its text for simple headings. I have an article on my site about this
i think you're better off with what nick said. It makes sense too. All your design orientend images should be accessible via your CSS and the ones related to content should be inside your markup.
There's no sense in crowding your css file with classes or ids meant for content images.
Take it this way: your design and layout should be flexible using your css file to alter certain elements (background images for example), yet your content images are likely to remain the same (a newsphoto for example). - No point in storing those in your css file.
Also "alt" makes for eficient SEO in some search engines, which, in terms, means you must have your content images in your markup rather than your css in order to use that atribute.
nick1presta and tsk have got it right, IMO. Semantics seems to be the issue. A good rule of thumb is to disable css on the page. If the information is crippled because some image is gone, it belongs in the markup. If there are images unrelated to the content, they belong in the css.