The results of the State of HTML 2024 survey are in! Though the name suggests it’s HTML-only, the survey focuses on the web platform in a more general sense, giving us some fascinating insights into not only the state of the web, but also some sense of where it’s heading in future.
Who Participated?
Before we dive into the results , it’s important for us to consider who actually responded to the survey.
Unsurprisingly, 18% of all respondents are located in the US, skewing the results somewhat. However, Europe is represented well, with Germany, France, UK, Russia, Netherlands and Spain making up 35% of the respondents, combined.
The average respondent is 35 years-old, male, and is experienced in the industry, possessing between 6 and 20 years experience.
In terms of education, the average respondent has a University degree (with only 24% not possessing a degree), and while respondents are overwhelmingly white, we are seeing greater representation amongst respondents with regards to gender, race and ethnicity and disability status; a sign that the industry continues to become more diverse.
Popular HTML Features
There’s a lot more to modern HTML than you might realise. Sure, you can simply use it to build the structure of your website’s UI, but there’s plenty more under the hood if you take the time to look.
Even so, landmark elements like <main>, <nav>, <aside>, <header> and <footer> are the most popular aspects of HTML, both in terms of their usage and the sentiment towards them. It’s good to know we reach for these landmark elements, recognising their semantic superiority compared to the humble <div>.
The tabindex attribute sits second in terms of usage and sentiment, showing a trend towards developers valuing aspects of HTML that are useful both for accessibility and giving a good user experience.
Advanced features like lazy loading and srcset and size attributes (where we can provide several source images with hints to help the browser pick the right one) are reported as being widely used, with respondents saying they are likely to continue to use them.
While lazy loading is so easy to implement that you might think “how is it an advanced feature?!”, it requires just a little more technical understanding than HTML basics like semantic structure-based elements, so it is overlooked among web newbies.
A number of features register as having low-usage, but being positively-regarded by those that use them. Features such as <datalist> (for handling pre-defined options), the Popover API (offering a simplified - and more semantic - approach for handling modals and overlays) and <dialog> (again, an improved way to handle alerts or dialog boxes) are all incredibly well-liked, if lesser-known than some other features.
When it comes to building native web apps for desktop and mobile, features like Web Share API and the File System Access API are thought of positively, but only 6% of respondents have actually used them.
Pain Points
Part of the pain of using HTML is keeping up to date with new features, and understanding how to use them.
Features like Isolated Web Apps, EditContext and <model> for VR/AR content are all great examples of features that might be hugely useful for developers in all kinds of environments, but are suffering from lack of awareness. For each, the majority of respondents say they haven’t even heard of them, which is such a shame for the developers who worked so hard to develop them.
Forms are a particular pain-point for developers building for the web. While the FormData API is generally well-liked among those who have used it, with its widespread cross-browser support and the way it simplifies capturing and using data from forms, the results show a relatively clear picture of how developers feel about forms in general… and it isn’t positive. Form styling and validation are noted as particularly tricky to handle.
In addition to far-from-comprehensive validation methods, built-in browser styles force developers to continue to use hacks and overrides, despite relying on fewer of these than in the past (anybody else remember the pain of using Internet Explorer?).
On that note, cross-browser compatibility tops the list of pain points when it comes to interactivity, even though this is trending downwards in terms of the negativity developers feel towards this aspect of HTML.
SVG’s make a surprising appearance on the list, with 18% of respondents noting that they find them difficult to style with CSS. We can all agree they’re incredibly useful and common-place, it’s fair to say that they could be easier to customise.
It’s fair to say respondents are divided around Web Components. A relatively new addition, first introduced in 2011 but only becoming widely supported as recently as 2018, web components have not gained widespread use just yet. Aspects like the <template> element (to store HTML not rendered immediately), and HTML modules (allowing you to import HTML files via JS imports) are well-liked by those who use them, respondents say the shadow DOM is not enjoyable to work with, and can feel complex to work with.
Tools
It’ll come as no surprise that frameworks like Next.js and Astro top the list in terms of tools that respondents use, but 33% of respondents prefer to write HTML in a classic framework-less environment. Vanilla HTML is alive and well, hooray!
In terms of validation, the W3C HTML Validator is by far the most popular tool (hasn’t it always been?), with only 4% of respondents using npm packages like HTML-validate or tools built-in to their IDE. Sometimes classics are classics for a reason.
Performance-wise, two tools dominate the market. Lighthouse is somewhat of a staple, with 77% of respondents saying they use it, with Browser’s Devtools not far behind (70%). PageSpeed Insights and WebPageTest also prove popular though admittedly, much less so.
Google continues to be the biggest player in the world of analytics, as well as the world of browsers. More than half of respondents (51%) say they use Google Analytics to track their websites stats, with Matomo and Datadog sitting in a distant second and third respectively (11% and 9%).
Chrome, Firefox, Safari and Edge continue to be the go-to browsers for most respondents, but new players like Arc and Brave have staked their claim on a portion of the market, with around 10% using them. It’ll be interesting to see if this changes, or whether they’ll be short-lived players, drowned out by the top four.
Opinions on HTML
We generally see a trend towards greater use of accessibility-related aspects of HTML, with most respondents noting that accessibility is taken seriously by their workplace, too. Of course we have some way to go towards ensuring all aspects of the web are accessible, but it certainly gives us hope for the future.
Keeping up to date can be difficult, and nearly half of the respondents (46%) said they often find it hard to find time to learn how to use new features, if they are even aware of their addition in the first place. This presents us with the question of whether the onus is on the developer to stay up to date, or whether there’s a better way to help them stay abreast of changes than the way it works at the moment.
Browser interoperability continues to be the biggest obstacle encountered by web professionals and while more than half remain positive about the direction the web is heading, we all hope for a day when interoperability as an issue is a thing of the past.
Summing Up The State of HTML
Fancy new frameworks, tools, languages and libraries so often grab headlines, and generate buzz with big promises of ‘changing the game’ when it comes to building for the web.
By contrast, HTML continues to quietly evolve, introducing and improving features that make the web more accessible and projects more performant, as well helping us developers cut back on the amount of JavaScript (or other languages) we use, as we’re able to opt for HTML-only alternatives instead.
HTML has come a long way since its early days in the 1990s.
While it has grown more complex over the years, its charm and simplicity remain, with powerful optional features being continually refined over time. HTML is alive and well, and just getting better!