News for hackers. Stuff that matters.
Re:This Website Has No Class by butlike on Thursday September 18, 2025 @10:46AM (#45290377)
Because a <ul> can be either a horizontal nav bar or a vertical list. Without differentiating the <ul>, how would you style it?
Re:This Website Has No Class by vharuck on Thursday September 18, 2025 @10:52AM (#45290441)
At the risk of pedantically answering just this one example, wrap the nav bar list in a <nav> element: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
Re:This Website Has No Class by taeric on Thursday September 18, 2025 @11:06AM (#45290604)
This doesn't really change the idea, though. The structure is specifically to communicate style opportunities. Exactly how it is styled can be dependent on other things, as well, but the structure is specifically an affordance to facilitate styling.