<p>Yes, HTML is broken (see title ↑). Anyone who has used HTML on a big project knows it.</p> <p>Just the other day, I went to code a submit button for a form. Should be pretty straightforward. Well how come this is what I wrote, then?</p> <pre> <code><table> <td> <a class="submit"> <img src="submit-image.bmp"> </a> </td> </table> </code></pre> <p>I've had complaints from users saying they "can't use this shit" and mean developer "friends" have pointed and laughed at me, like it's some sort of failing on my part.</p> <p>But let's look at the facts:</p> <ol> <li>I have a degree in computer science</li> <li>I literally probably have a really high IQ. That stands to reason.</li> <li>I live in San Francisco</li> <li>That's where Silicon Valley is. <strong>Ever heard of it??</strong></li> </ol> <p>I may have majored in computer science, but I minored in rationalist scientific enquiry. I say minored; it was more of a hobby. Anyway, given the <strong>FACTS</strong> provided above, if I see myself writing shit code I can only draw one logical conclusion:</p> <blockquote><p>It's not me who's stupid, it's you. You stupidly designed the stupid thing I'm trying to use stupidly and it's all your fault. Stupid HTML standardista stupid bum faces.</p></blockquote> <p>I rest my case.</p> <p>But if that isn't enough to convince you that HTML is trying to make me look bad, wait until you see <em>just how poorly</em> HTML deals with basic arithmetic! Consider the following code example:</p> <pre> <code> <p> + <i> </code> </pre> <p>Which of the following do you think the above code evaluates as? The answer may surprise you.</p> <ol> <li><code><p><i></code></li> <li><code><pi></code></li> <li><code>π</code></li> <li><strong>IT JUST WRITES IT OUT THE SAME THEN COMPLAINS AT ME ABOUT MISSING CLOSING TAGS WHATEVER THEY ARE??1!!?1!</strong></li> </ol> <p>I can do basic arithmetic, HTML. Why can't you? Oh, you're a "markup language" are you? Well <em>bully for you</em>. I didn't learn about HTML in my Ivy League university of choice, so how could I know that?</p> <p>Fine, whatever. When there's an international standard for formatting and transmitting digital information available, <strong>I'LL USE IT TO FUCKING WELL LOOK UP WHAT HTML IS, HOW ABOUT THAT?</strong></p> <hr> <p>Idea for this article from <a href="https://twitter.com/petervangrieken">@petervangrieken</a>.</p> <p>If you're struggling with the finer points of writing accessible markup, I have a new blog called <a href="http://inclusive-components.club/">Inclusive Components</a> which explores the inclusive design of web interfaces.</p>
HTML Is Broken
Read the full piece at https://heydonworks.com/article/html-is-broken/