DIV vs UL,LI performance

12,792

Solution 1

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

Solution 2

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

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

Share:
12,792
user1802597
Author by

user1802597

Updated on July 03, 2022

Comments

  • user1802597
    user1802597 almost 2 years

    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?

  • user1802597
    user1802597 about 11 years
    So you are saying both will give same performance for the same design?
  • Pavlo
    Pavlo about 11 years
    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.
  • Eevee
    Eevee about 11 years
    yes. you might as well ask whether putting more vowels or consonants will give better performance. (most) tags aren't special at all.