HTML needs variables!

So I’m studying front-end stuff right now, diving deep into HTML and one thing that I’m immediately feeling is really missing from HTML is variables.

I’ve studied all these other languages for the past few years and gotten used to doing things programmatically. Now suddenly I switch to the “language” of HTML and there are no variables.

This isn’t right!

To put it quite simply, there should be a way for example with HTML to:

@home = https://somewhere.com

Then somewhere else in the code:

<a href=@home>My home page</a>

This example uses the variable format of CoffeeScript Object Notation but of course some other format could be used.

With variables like this it would make it a lot easier for example to have a page with multiple links to a home page and if you change the server or move the home location you only need to update the one @home variable and not worry about all the other links.

I can’t believe that HTML doesn’t have variables!