DEV Community

Serhii Babich
Serhii Babich

Posted on

What is, in fact, HTML and do we still need it in 2024?

The year 1989 was an interesting time. While the Berlin Wall was being dismantled in Germany and Nintendo Game Boy started conquering the world, my beloved Ukraine experienced the first truly Ukrainian music festival "Chervona Ruta", and the "Braty Hadyukiny" released their debut album "Vs'o Chotko", forever changing the songs Ukrainian youth would sing around campfires in the mid-2000s.

Around the same time, a CERN employee named Tim Berners-Lee proposed the idea of a system of interconnected hypertext documents, laying the foundation for what would later become the World Wide Web, giving us all jobs and the ability to access all of humanity's knowledge, as well as pictures of naked bottoms, within a moment's reach.

Mr. Berners-Lee looks at you when you say you don't want to learn HTML because you know React

Mr. Berners-Lee looks at you when you say you don't want to learn HTML
because you know React

To bring this idea to life, Mr. Berners-Lee began working on a revolutionary language - HTML, or Hypertext Markup Language. In 1991, he published a publicly accessible document that described this language, which included all 18 HTML tags that existed at the time, many of which are still part of the HTML specification today.

By the way, did you know that the world's first web page still exists and can be visited at this link? Actually, it's a copy, because the original page was hosted on Tim's own NeXT computer, and to keep access uninterrupted, there was a note on the system unit that said DO NOT TURN OFF.

So what exactly is HTML? It's a markup language. But what do we mark up? And what is markup in principle? The answer, though obvious, is not too simple, so let's try to figure it out.

It is important to remember that HTML was primarily developed for marking up documents. A document differs from simple text in that it serves, so to speak, as a structured container for various information, including text, images, tables, lists, and other types of data compilation. The main purpose of documents is to organize all this data in such a way that it all makes some sense.

And thus, to be able to create documents, there exists markup, which allows separating certain parts of the document from each other and indicating the specific role and meaning of these parts. We can explicitly indicate that this is a headline, this is a section, here's a table, there's a link, and this is a picture of a cat. And in order for the system that processes the document to have some idea of what we want from it, we must have at least two things: a clear set of instructions that we use for such markup, and a dictionary of these instructions, so that the system understands the meanings of these instructions just as we do.

And HTML is exactly that set of instructions (for those who might be interested, this language is based on SGML). And the specification is that dictionary. We can explicitly tell the browser which version of the specification to use for a particular document, and depending on that, the display result can vary significantly.

In general, document markup can perform a lot of tasks. We've already learned a bit earlier about dividing content by role and meaning, but there are other tasks that the same HTML tags can perform. For example, formatting. That is, we can specify not only what to display, but also how, relying either on built-in styles or on our own.

Also, for example, you can store and transmit certain data. This is more related to XML, but in HTML you can do this using attributes. In this way, you can even store some initial or intermediate state that can affect the display of an element.

Also, proper markup is an important part of accessibility — a set of web content development practices that allow users with disabilities to use the web conveniently and effectively. This includes not only visual impairments but also mobility and even cognitive disorders.

And, of course, it allows for an absolute separation of content from presentation. For example, using HTML together with CSS, we can completely change the appearance of the entire document or its parts, without changing the structure of the document itself.

The best illustration of this is CSS ZEN GARDEN — a site that has thousands of faces. Its HTML has not changed since 2003, but during this time it has changed many styles, becoming a kind of challenge for developers who create new, completely different designs using the same markup.

Image description

Few or the thousand faces of CSS ZEN GARDEN

Well, well, you might say, we understand what it is, and even what it's for. But where can it be used, this HTML? The first thing that comes to mind, of course, is for developing web pages. But it would be very wrong to assume that its practical application ends there. On the contrary, it's just beginning.

After all, remember that HTML is a hypertext markup language, that is, designed for marking up hypertext documents. It doesn't say it has to be only web documents. Well, not just web documents.

One such case is email. Usually, we use very simple means to format our text, but most email clients understand more complex markup, although if you want to create all sorts of sophisticated layouts, I have bad news for you — you'll have to forget about the benefits of modern CSS and turn to the forbidden dark arts of table formatting.

You can say, of course, that HTML can also be used for desktop development, but this is very, very relative, because, in fact, it's the same browser with certain perks and custom icons.

If we talk about really non-web use, then we can mention the EPUB format for electronic books, and indeed many different formats rely on HTML.

In principle, HTML can also be used in printing, especially if you skillfully use CSS media queries, in particular @media print. This, of course, requires some effort, but I assure you that you can definitely prepare a small book for printing.

Let's turn away from the traditional perception of the HTML document as a document to the current state of affairs. We can see an incredibly diverse and vast realm of user interfaces, with the help of which we can do a lot of different things — click, drag, push, input, open, close, and generally interact in all sorts of ways.

User interfaces can be anywhere, and the ease of launching a web browser on any kind of device contributes to the fact that HTML is spreading to an increasing number of devices. If I were to list everything into which you can fit a screen and a trimmed browser, I would probably run out of character limit for this article.

So let's imagine the most obvious examples where you can meet our favourite language: smart and not-so-smart TVs, car onboard computers, interactive kiosks, self-service terminals, and other devices.

And also... video games. Yup. For example, for Unreal Engine there is a Web Browser Widget plugin that allows you to create a game interface using HTML, CSS, and JS. In general, the soulless machine named ChatGPT tries to convince me that at least EVE Online, Battlefield, and Destiny 2 use HTML to display certain parts of the interface. I haven't found 100% confirmation of this information, but various hints scattered across the internet also indicate that web technologies find their place even in the development of AAA games.

Image description

evevision — UI extension for EVE online built with HTML, CSS and JS

In general, HTML remains a constantly evolving living language, not only gaining new capabilities but also getting rid of frankly outdated and unnecessary tags. For example, center and font have sunk into oblivion thanks to CSS, menu and dir have been replaced by the more general ul, and tags like nextid would have made rise a brow even at their time.

On the other hand, modern HTML is enriched not only with new semantic elements but also quite functional ones, for example, dialog for displaying dialog windows. Or finally, support for elements that have been in the standard since 2014 but have just now been implemented by browsers. Well, you know, like finally cleaning up your shed.

Today, there is no way around web development without HTML, and tomorrow — who knows where else this language will become the standard. To some, it seems overly simple, to others — clunky, to some primitive, to others — too complicated. But that does not negate the fact that HTML is the foundation of web development, and without it, we would have nothing to decorate with CSS or animate with JS.

Can you not learn HTML in today's world full of frameworks? You definitely can. Should you learn HTML in today's world full of frameworks?

You definitely should.


Please, strike a comment, either you liked or disliked this article and let me know if you'd like to read such texts on other topics. I would greatly appreciate your feedback!

Thank you and have a nice day!

Top comments (6)

Collapse
 
dimapopov profile image
dima-popov

I thought about the idea of replacing HTML and making web pages with WebGL, similar to video game UIs, which are powerful even without HTML. However, I realized that it is not a suitable idea and that HTML is quite cool.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

This idea has been around for a while, and it basically comes back every time a new technology for rendering in the browser comes around.

Same as flash websites, the problem here is that making a website look good is only a small part of the problem, and features like accessibility, machine readability, etc. make the whole idea a lot more complicated and way less ideal than it sounds on paper.

Collapse
 
babichweb profile image
Serhii Babich

So, you wanted to reinvent rendering engine? )

Collapse
 
dimapopov profile image
dima-popov

No, I renounce that idea, as theoretically interesting but not suitable. So, HTML is our strength.

Collapse
 
stefanak-michal profile image
Michal Štefaňák

At my job there is a industry solution which has each whole website as svg.

Collapse
 
marchingband profile image
Andrew March

My hot take on this has always been that, given the amount of labour invested in working around the limitations of html, to produce js frameworks like react, we could have built html 1000x over and made a new markup language with apps in mind, and might be further ahead today.