I want to be able to use condensed HTML syntax

Submitted by Derek Koziol

I feel HTML is unnecessarily verbose and solutions like Pug and HAML are much more readable. Why not have Pug syntax (or others) natively understood by browsers? Compare:

<div class=""grid"">
<h1 class=""title"">Some text here</h1>
<img class=""cover-photo"" src=""https://samplelink"">
<p class=""description"">Some example description text</p>
</div>

to

.grid
  h1.title Some text here
  img.cover-photo(src='https://samplelink"")
  p.description Some example description text

I don't know why I'd ever choose to write the HTML version, but that's what all our code has to compile to currently. I can imagine a world where Pug (or an alternative) natively just works. HTML is clunky, hard to read, and has so many weird quirks that you just have to learn over time. It doesn't have to be forced (e.g., "everyone must use pug syntax!"), but it could be just become something you could declare in the doctype if you want to write another way.

Do you want this too? Share it!
Votes
0
Vote by sharing on Twitter
What are votes for and how are they tallied?
Tagged
HTML