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'?
Author by
user1802597
Updated on July 03, 2022Comments
-
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 about 11 yearsSo you are saying both will give same performance for the same design?
-
Pavlo about 11 yearsI 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 about 11 yearsyes. you might as well ask whether putting more vowels or consonants will give better performance. (most) tags aren't special at all.