Re:Disabling Safari AutoFill for a single line address input...
by themoose8 on Monday January 18, 2021 @03:16AM
(#25819451)
Getting off topic now, but I like those, and still practise it. It lets the reader know not to expect a seperate closing tag.
Re:Disabling Safari AutoFill for a single line address input...
by saagarjha on Monday January 18, 2021 @06:36AM
(#25820705)
Who are you to tell people they can't live in an idealistic world where the documents we send each other have a standard behind them that isn't special-cased for the laziness of years of web developers?
Re:Disabling Safari AutoFill for a single line address input...
by tannhaeuser on Monday January 18, 2021 @08:08AM
(#25821423)
I'm the one working hard to debunk the misconception that HTML is "sloppy" or XML in any way adds standardization to HTML that wasn't there already with SGML.
Re:Disabling Safari AutoFill for a single line address input...
by flagrant on Monday January 18, 2021 @09:49AM
(#25822270)
Self closing tags are perfectly valid in HTML 5 and there's nothing wrong with using them. Even if the parser ignores them, they're still useful for the reader. HTML 5 does not require you to close your paragraph tags either but most people still do it because tag soups are hard to understand.
Re:Disabling Safari AutoFill for a single line address input...
by ljm on Monday January 18, 2021 @09:53AM
(#25822319)
This has to be one of the most absurdly elitist (or patronising?) comments about HTML I've had the pleasure of reading.
Who is this 'we' you speak of?
Re:Disabling Safari AutoFill for a single line address input...
by malf on Monday January 18, 2021 @03:43AM
(#25819609)
This is probably jsx, and the slash is required.
Re:Disabling Safari AutoFill for a single line address input...
by Doctor_Fegg on Monday January 18, 2021 @05:47AM
(#25820393)
How can a space be pretentious-looking?!
Re:Disabling Safari AutoFill for a single line address input...
by Freak_NL on Monday January 18, 2021 @05:58AM
(#25820454)
Takes up space without adding any substance.
Jokes aside, that space before the / exists as a habit because Internet Explorer couldn't handle tags like <br/>, so in order to have valid XML that worked in IE as well you would do <br />.
Completely pointless nowadays of course, although I do like the / for single elements. It's kind of nice to be able to write HTML5 and XML both with roughly the same syntax.
Re:Disabling Safari AutoFill for a single line address input...
by bobince on Monday January 18, 2021 @08:00AM
(#25821347)
Oh it's older than that, even. IE was always fine without the space. It was for Netscape.
So, sure, maybe there's a good reason to want XML-compatible syntax. But Netscape 4 users? Let's hope not!
Re:Disabling Safari AutoFill for a single line address input...
by bottled_poe on Monday January 18, 2021 @03:42AM
(#25819602)
I’ll do what the linter says thanks.
Re:Disabling Safari AutoFill for a single line address input...
by asiando on Monday January 18, 2021 @04:10AM
(#25819785)
That’s backwards
Re:Disabling Safari AutoFill for a single line address input...
by rjmunro on Monday January 18, 2021 @10:11AM
(#25822492)
IMHO the most important thing is to be consistent with the rest of the organisation's codebase. After a while people get used to reading it that way.
So doing what the linter says is exactly the right answer.
Nit: we don't use HTML like it's 2005 anymore. So instead of
with bogus XHTML-like slash at the end, just use Sorry, but it's a pet peeve of mine to point out cargo-cult idioms like that. The slash at the end was there to make your HTML parse as XML/XHTML. But unless you have very specific requirements (like serving your page as XHTML, or fruitlessly attempt to produce or parse your HTML using an XML toolchain) we don't do that anymore, even in 2019. The slash and the pretentious-looking space before it is ignored/error-recovered away by browsers and other HTML parsers anyway.