3 ms·
Your comment seems based on the article suggesting humans should handwrite HTML like this, which I don't think is the intention here. Somebody else posted about
by ht85 10y ago
Your comment seems based on the article suggesting humans should handwrite HTML like this, which I don't think is the intention here. Somebody else posted about the spec description of open <p> tags and there is no way you'd want to have that in mind when writing markup, just close the tag. This would be like a more powerful form of removing trailing comas, which is "neater", but is extremely painful whenever you're refactoring and moving things around.
You say the HTML tag has no meaning, but it has the advantage of being explicit instead of implicit, as well as universal.
There are situations where implicit is better, because the explicit way feels like a big waste of time and demotivates developers.
There is also a lot of value in conventions, as all the efforts around coding standard and linting tools show. It forces different people to work more similarly, using an established way to do things instead of their own quirks, facilitating collaboration and sometimes educating them about the features and caveats of whatever they're using.
I've never been annoyed writing <html>, <head>, which happens a handful of times in the lifetime of a project that I'll spend thousand of hours on.
Again, I don't think any of this is relevant here, as those optional tags would be cleaned up at build or rendering time, and reinserted by the browser / parser. This seems like an awful lot of computation to save a few bytes though, but maybe processing power is that cheap nowadays.
- hannob 10y agoWell, I don't need to remember all of them, I can just remember the ones that I find convenient and use them. In the end the validator will tell me whether I messed something up. While you're right that I won't write <html>, <head> very often I can very well imagine that skipping </td> and </tr> is convenient in many situations.
- deleted 10y ago[deleted]