开发者

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 ULs 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜