Well I got this question in an interview test.Give two reasons why the page might take longer to download than necessary with this image.
< IMG src="somethin.gif" width=10 height=10 border=0 >
Well I came up with 3 instead of 2 reasons Xhtml validation problems,image resizing and unnecessary border=0.So what is wrong in here? .
Validation problems don't increase download times (and, aside from some extra whitespace, it is the only thing stopping it being valid HTML 4.01 Transitional is the missing alt attribute).
The things that could increase download times are:
Images which are inside links have a border by default, so border=0 might not be as "unnecessary" as you think (although it is still better handled with CSS).
There is a space at either end. That's 2 unnecessary bytes to download ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With