Forum Moderators: open

Message Too Old, No Replies

to use height and width attributes in table and img tags always?

         

m77_lv

12:55 pm on May 24, 2002 (gmt 0)

10+ Year Member



some online page validator outputed in the load time report "missing height", "missing width" for tables and imgs. i can understand that attributes could a little speed up page randering. anything else why to use them?

sparrow

1:40 pm on May 24, 2002 (gmt 0)

10+ Year Member



If I remmber correctly older versions of Netscape need to be told the size.

moonbiter

2:26 pm on May 24, 2002 (gmt 0)

10+ Year Member



Per spec, img width and height are optional.

Theoretically, when specified they can allow a browser to leave the the proper amount of space in the layout and render the rest of the page while the images are otherwise downloading, making it look like the page is downloading faster (it really isn't).

Other than that, and the possible Netscape bug mentioned by sparrow -- which would have to be a bug affecting NS v3 or earlier, surely -- I know of no real use for them.

One possible argument against using them is that certain browsers will use the width and height even when the image is not displayed, constraining the alt tag to these boundries. This can make long alt tags unreadable.

Still, I use them all the time. Habit, I guess.

BTW, what validator are you using?

m77_lv

2:37 pm on May 24, 2002 (gmt 0)

10+ Year Member



validator: [netmechanic.com...]

could you suggest good validator?

BlobFisk

2:38 pm on May 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The original of the species... and the best too!

[url=validator.w3.org]validator.w3.org[/url]

<added>

This will only check the validity of your (X)HTML... yours seems to check links, load time and spelling too.

(edited by: BlobFisk at 2:40 pm (utc) on May 24, 2002)

m77_lv

2:40 pm on May 24, 2002 (gmt 0)

10+ Year Member



i also tried [validator.w3.org...] but it is "too right". even Google and Yahoo! pages are not valid

BlobFisk

2:43 pm on May 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




even Google and Yahoo! pages are not valid

Just because the "Big Boys" pages don't validate doesn't mean it's ok for your pages not too. ;)

Sometimes you have to hack at bits of your code to make it cross-browser (ok, ok NS4) compatible... but generally, I'll write my code, make sure it validates and then put in the hacks for NS with a clear conscience!

ergophobe

4:27 pm on May 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




i also tried [validator.w3.org...] but it is "too right"

Since you use quotes, I assume you don't want a lecture on validation..., you just want to use the tool.

So, have you tried to force looser doctypes? If you don't validate to HTML 4 Transitional, I would think you would want to redo your code. If you don't want to validate to XHTML 1.0 strict, well most people don't (I do, but I don't work against deadlines :) ).

Tom