Hey guys, Basically im wondering Which would be the better to do for a large amount of images asigned to one class. I know that by doing it by css technically the size of text formating would be smaller so the page should load faster, But then by doing it with html your page will load without waiting for your images to load because it allocates the space they need from the width="" and height="" tags Does anybody know wether it works the same way in css? Does the page allocate space for the images then continue to load the rest of the page without waiting for the images? Please only answer if your 99% sure. Thanks in advance
Certain elements have dimensions that are implicit. Width is implicit in table, img, and object. Height is implicit to img and object. (No other use of the attributes are valid.) You are correct that setting these attributes may speed the rendering of the page, as the layout space may be reserved prior to getting the other files. (Tables are another pile of issues, but setting the width will often help.) The stylesheet is applied only after the document object model has been built by the UA. The UA walks the DOM (see attached X-window dump) and searches the stylesheets for applicable rules for each node. But, then the page isn't usually rendered until the stylesheet is read and applied, anyway. There may be some small advantage to using the html attributes; they should probably be used for structural reasons (I always try to use them), but I doubt the rendering speed difference is particularly noticeable unless neither attributes nor style rules are used. cheers, gary