Performance: Navigation structure basics
MEDIUM IMPACT
This affects the page's initial load speed and visual stability by how navigation elements are structured and rendered.
<nav><ul><li><a href="#">Home</a></li><li><a href="#">About</a></li><li><a href="#">Contact</a></li></ul></nav>
<div><div>Home</div><div>About</div><div>Contact</div></div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Non-semantic <div> navigation | Multiple nested divs | Multiple reflows on load | Higher paint cost due to layout shifts | [X] Bad |
| Semantic <nav> with <ul> and <li> | Simple list structure | Single reflow | Lower paint cost, stable layout | [OK] Good |