Div vs Span html tags
In my application, i have to display a huge treeview with more than 10,000 nodes. I have made a custom 开发者_如何学Ccontrol to do this but wanted to know which tag to use div or span to apply formatting and which is faster also on IE8. I used div and the page reder took 17 sec. Should i use span ? Or any other way to improve page performance?
You should use a tag, that matches the meaning of the content—for a list of files and folders a list would be appropriate. You may nest multiple UL
s to present your tree.
The parsing speed doesn't have to do with the tag you used, but rather with the CSS you wrote (and a lot of others reasons). See also: How do you measure page load speed?
Span would be more ideal I would say, with regards to page optimisation, you may have to have a look at some javascript to maybe alter things to increase performance.
精彩评论