DEV Community

Cover image for 5 things AI can't do in HTML.
DevUnionX
DevUnionX

Posted on

5 things AI can't do in HTML.

The rapid advances in artificial intelligence over the past few years have produced genuinely impressive results in text generation, image creation, and even video synthesis. It's easy to get swept up in the excitement and start believing these systems can do essentially anything. They can't. And understanding where they actually fall short matters, both for people using these tools and for anyone thinking seriously about what AI can and cannot replace. There are five areas in particular where current models consistently struggle, and these limitations don't disappear just because the technology keeps improving.

Start with common sense. AI models work by matching patterns across enormous training datasets, which sounds powerful until you realize what that process fundamentally cannot do: actually understand concepts. The difference between pattern matching and genuine comprehension becomes visible in specific situations that humans navigate effortlessly. Idiomatic expressions are a good example. When someone says they need to "break the ice" at a meeting, any adult human immediately grasps the social meaning without any conscious effort. Language models, despite their sophistication, frequently interpret such phrases in ways that reveal they're working with surface patterns rather than real understanding. The same thing happens with irony, with context-dependent meaning, with the kind of background knowledge humans absorb through simply living in the world.
This shows up in subtler ways too. Models can produce text that's grammatically impeccable and internally consistent on the sentence level while containing logical errors that any thoughtful reader would catch. The model didn't "notice" the problem because it isn't actually evaluating whether claims make sense against a model of how the world works. It's predicting what text should come next based on statistical patterns. For most tasks most of the time, that produces plausible output. But it means the model has no reliable way to flag the times when its output is confidently wrong.
The knowledge cutoff problem compounds this. A model trained on data from a certain date genuinely doesn't know what happened afterward, and more importantly, it often doesn't know what it doesn't know. Ask it about recent events and it may produce detailed, fluent, completely fabricated responses because it has no internal signal that says "I lack information about this." The pattern-matching machinery keeps running even when the relevant patterns aren't in the training data.

The second limitation is emotional. AI systems don't experience anything. This seems obvious when stated directly, but its implications are easy to underestimate. When a language model produces an empathetic-sounding response to someone's grief or distress, what's actually happening is sophisticated pattern matching against countless human emotional expressions. The words may be appropriate, even moving. But there's nothing behind them, no inner state that corresponds to the feeling being expressed.
Research from Cornell Tech looked at this directly, finding that large language models scored reasonably well on surface measures of empathetic response while consistently failing at deeper comprehension of what users were actually experiencing. The models could produce the right words while missing the actual emotional content entirely. This isn't a temporary technical limitation waiting to be solved with more compute or better training data. It's a structural feature of systems that have no inner life. Whatever emotional intelligence looks like in an AI system, it's always performance rather than experience, simulation rather than feeling.
This matters practically in any context where genuine human connection is part of what's needed. A therapist's effectiveness isn't just about saying the right things; it depends on the patient knowing they're understood by another conscious being who actually grasps their situation. A friend's support during a crisis carries weight precisely because it comes from someone who could be affected, who has skin in the game, who chooses to be present. AI can approximate the verbal forms of these interactions, but the approximation is hollow in ways that people often sense even when they can't articulate why.
Third, there's the question of genuine creativity. This one gets contested more than the others because generative AI produces outputs that can appear strikingly creative, sometimes genuinely beautiful. But there's a meaningful distinction between recombination and invention, between remixing existing elements and creating something that didn't exist in any form before.

What AI systems do is learn the statistical structure of vast amounts of human creative work, then generate new instances that fit those learned distributions. The outputs can be sophisticated, novel in local ways, surprising in their specific combinations. But they're always downstream of the human creative work in the training data. The model has no experiences, no desires, no perspective on the world that would allow it to make genuinely new meaning. It can produce another painting in the style of existing paintings, another story with the structure of existing stories. It cannot produce a new way of seeing.
Human creativity at its most powerful draws on something AI lacks entirely: the specific weight of a particular life. When a writer puts their actual losses and joys and confusions into a novel, readers feel that reality in the work. When a composer writes music out of genuine obsession or grief, something in the music carries that origin. AI-generated work is competent at the surface level precisely because it's learned what competent surfaces look like, but it can't access the depth that comes from real experience. This is why the most accomplished AI-generated art tends to feel slightly flat, even when technically impressive. Something is missing.
The fourth limitation is about memory and scale. Current language models can only work with what fits in their context window, a fixed amount of text that varies by model but is always finite. Once you exceed that limit, earlier parts of the conversation or document simply fall away. The model doesn't notice this happening; it doesn't flag that it's working with incomplete information. It just continues generating, now missing pieces it was given earlier.
This creates real problems for complex, extended projects. Imagine asking an AI to analyze a large codebase, a lengthy legal document, or an extensive research archive. The model can handle chunks, but it can't hold the whole thing in view simultaneously. Connections between distant parts of the document, patterns that only emerge when you can see the whole, details from early sections that become relevant much later: all of these fall through the gaps when the context window overflows.

Beyond the context window, there's the issue of persistence. Standard language models have no memory between conversations. Close the chat and start a new one; the model has no idea who you are or what you've discussed before. Any coherent ongoing relationship requires feeding the relevant history back in at the start of each session, which itself eats into the context window. Systems can be built around this limitation with various retrieval mechanisms, but the fundamental constraint remains. The model isn't learning about you over time; it's processing whatever you put in front of it right now.

The fifth area is technical quality in code and markup. AI can write HTML, CSS, and code across many languages, and for many purposes it does so quickly and serviceably. But there are categories of quality that current models systematically fail to maintain. Accessibility is a prominent example. Building a web page that works properly for screen readers, that has correct heading hierarchy, that uses ARIA attributes appropriately, requires understanding not just the syntax but the semantic purpose of these elements and how assistive technologies use them.

Analysis of AI-generated HTML has found consistent patterns of failure: headings placed in incorrect hierarchical order, ARIA attributes applied in contradictory or counterproductive ways, alt text that's either missing or inappropriately verbose, semantic structure that looks right to visual inspection but fails the tests that actually matter for accessibility and search indexing. The model can write code that renders correctly in a browser while being meaningfully broken for significant portions of users.
This isn't because AI is bad at HTML. It's because getting these details right requires understanding why each element exists and how it functions in the larger ecosystem of web technology and user need. A human developer who understands accessibility writes code differently because they're thinking about the blind user navigating by screen reader, the keyboard-only user who can't use a mouse, the person with low vision using high contrast settings. AI generates code that fits the patterns of code it has seen, and much of the code it has seen doesn't prioritize these concerns.
Taken together, these five limitations point toward something important about what AI actually is. These systems are remarkable at surface pattern completion across a vast range of domains. Give them a task with clear structure and abundant training examples and they'll often produce impressive results. But they have no inner life, no genuine understanding, no real creativity, no persistent memory, and no reliable quality judgment. They produce outputs that often look like the product of understanding, creativity, and judgment without possessing any of those things.
This doesn't make them useless. It makes them tools, powerful ones with a specific and somewhat unusual profile of capabilities and limitations. The mistake is treating them as something other than what they are, expecting them to substitute for human understanding or to catch their own errors or to care about the quality of what they produce. They won't, because they can't. Knowing this isn't pessimism about AI; it's the prerequisite for using it effectively.

Top comments (0)