7

Is there any performance wise difference between DIV and UL html tag if we are designing a complex web page. Which one is lighter and loads faster in browser.If I can design using both div and li, then what should i choose?

Pavlo
  • 43,301
  • 14
  • 77
  • 113
user1802597
  • 175
  • 1
  • 1
  • 14

4 Answers4

9

They're just tags. There's zero difference whatsoever between them DOM-wise; the only difference is in the rendering (CSS, which you can customize either way) and the meaning (semantics).

If you have a list of things, use a <ul>.

Eevee
  • 47,412
  • 11
  • 95
  • 127
  • So you are saying both will give same performance for the same design? – user1802597 Jan 26 '13 at 09:32
  • 3
    I can confirm it: tag choice is probably the last thing to worry about in website performance optimization. I recommend to start with [this tutorial on CSS Tricks](http://css-tricks.com/video-screencasts/114-lets-do-simple-stuff-to-make-our-websites-faster/). – Pavlo Jan 26 '13 at 09:47
  • 1
    yes. you might as well ask whether putting more vowels or consonants will give better performance. (most) tags aren't special at all. – Eevee Jan 26 '13 at 22:46
6

Please check this one, it might be very useful for you to decide

Why should I use 'li' instead of 'div'?

Community
  • 1
  • 1
catherine
  • 22,492
  • 12
  • 61
  • 85
0

there's no difference whatsoever

splinterteal
  • 139
  • 9
0

ul""is an unordered list that starts at being marked and listed at an indented position away from the border. It's as if you individually pressed the Tab button for each item on the list. A "div" would mark and list the same list at the border, meaning the list and it's marks will be aligned with the left borders of the div it is in