views:

62

answers:

3

Is it necessary which thing comes first in source will render first? and other thing will wait to render above element then they will start to render?

like if header and sidebar comes first in source then will main content section will always render after header and sidebar.?

Does rendering of html element fully depend on source order?

+1  A: 

I believe browsers attempt to render something as soon as they can.

Tables are known exception, they will only render when completely loaded. So whatever you have inside them, the order won't probably matter.

Developer Art
A: 

Hopefully it's obvious that the browser can't render something until it sees in in your response stream. That said, you can use absolute positioning to move things around on the page, javascript to show, hide and move things and probably a bunch of other tricks too.

But do you really want your user to see your page jumping and flashing things so fast they wonder where they went? I'd say try to order your content logically from top to bottom. On the internet, most users don't realize they can scroll down and anything below the fold remains a hidden world to them. Lead with your most important info (ironic that this is my last statement, no?)

No Refunds No Returns
+1  A: 

These two videos are supposed to show the inner rendering process of a gecko browser to give you some insight. Techniques used in the visualisations are unknown though, so they might be fake..

Raveren