this post was submitted on 01 Oct 2023
476 points (96.7% liked)
Programmer Humor
32503 readers
475 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The reason I hate HTML: I've seen smart, reasonable people do this with IDs, and I'm not 100% sure they're wrong.
That’s because it makes sense when dynamically creating HTML. HTML is not a programming language, it’s simply markup - so if you want to generate some block of HTML in a loop and later access that block of HTML in JS (e.g. to interact with the UI separate from creating it in the first place), it’s a completely reasonable thing to do.
Agreed.
Also, HTML is only meant to be read by a browser's interpreter which has no problem keeping track of variable names.