The thing I hate about HTML (2010)
blog.jgc.org
blog.jgc.org
(div class="red"
(p
(Hello, World!)
)
)I'm not sure what problem this solves. It eliminates the tiny bit of work that is typing the extra characters in a closing tag, and in doing so you lose all of the other information as to what exactly you're trying to close. The end of most HTML douments would be ))))))) (plus a mess of indenting).
I can see this causing many more problems than it would solve; I'm okay with typing three extra characters to avoid lack of confusion.
The current syntax may not be ideal, but I don't think removing the object type from a closing tab is a good way to make it better.
</div> <!-- footer -->
</footer>
</div> <!-- row -->
</div> <!-- container -->
(If you actually look at the website, it will be pretty obvious that I'm no skilled web dev) <div>
<footer>
</footer>
</div>In practice, where the code is coming from 3 or 4 different levels of templating? Bets are off.
But then, Twig has its own weird issues sometimes with adding whitespace so I've given up caring how templated html works altogether in that case.
In any non trivial HTML doc many of the close tags will be far from the start tag, such as <body></body> and looking at a bunch of </> tags and having to go match them up with the correct start tags is more difficult. I run into this all the time with parentheses in your typical programming languages.
The IDE I usually use does auto close tags but also does folding both help with verbose close tags or matching parens so it doesn't matter much what the language does anymore. I generally do think html/xml is more readable because it so verbose including end tags.
<strong> one <em> two </strong> three </em>
This is technically invalid, but some browsers will "helpfully" parse it and apply strength to "one", strength and emphasis to "two" and emphasis to "three". This would be avoided if the closing tag weren't named.EDIT: Interesting about the downvotes. It shows a total lack of understanding the fundamentals of how browsers work but, alas, downvote away.
div class="red"
p
Hello, World!
(of course I know would not look nice if had to place <b>tags</b> inside of single line of text, and might get a little too indenty)[0] jade-lang.com
Certain elements are, or can be made to be, "inline" which gets them treated the same as characters on a line. Thus those elements, such as an image, will have white space between them as a word does in a paragraph. If you butt those element's tags right next to each other, with no white space between them, then there will be no white space on the displayed page.
The simple fact is: if you're still regularly typing your close tags in 2015, you either need a better editor or you need to learn how to use your current one better.
<p /Hello World/e.g. <p>, <li>, <tr>, <td>.
> But that's just messed up.
Nah, it's pretty straightforward once you wrap your head around it: https://html.spec.whatwg.org/multipage/syntax.html#optional-...
> </>
This reminds me of @annevk's XML5 concept: https://annevankesteren.nl/2007/10/xml5
Quite straightforward indeed.
practically always except when it obviously makes no sense. If you mean <p>Hello</p><span>World</span>, you obviously can't omit </p>, since the inline <span> would become part of <p>. But why would you write that anyway?
When you omit </p> where you shouldn't, the validator will usually tell you. You do validate your HTML, right?
Deleted comment
Then you show the tag/tag thing as if that is a HTML pattern but what you show as your example is just gobbldey-gook nonsense and you claim it's typical.
I just don't know what to say to you.
1. HAML
2. IDE
More laughable are the attempts at making HTML look like a programming language, which it is not, and I'd bet that comes as news to many.