Why is it important to put a width and a height attribute in an image <img src="images/example.jpg" width="40" height="40"> compared to this: <img src="images/example.jpg"> I've noticed that sometimes Dream weaver automatically puts them in and other times it doesn't
I have used <img src="images/example.jpg"> and works with opera ie and firefox. But some non-popular browsers may need width and height.
If you are rendering inside a dynamic size container, putting the width and height in the HTML let's that container render onscreen at the proper size BEFORE image loading starts. If you omit those most browsers will either hold off on rendering the container (especially if said container is a table), or have to 'shift' the design around on screen once it starts loading images, leading to a layout that 'jumps' into place. (as if that doesn't happen enough already with CSS) Because it's extra bytes it actually makes the page take longer to load, but it gives the illusion of the page loading faster... it's one of those performance vs. user experience things.