Here's a question for you that I'm curious about:

Do you validate your HTML? (For example, using the Nu HTML Checker https://validator.nu/ or the W3C Markup validator https://validator.w3.org) And why?

#HTML

Validator.nu - Nu Html Checker

@SaraSoueidan I use the W3C validator, mainly to make sure my production/generated HTML (which is sometimes minified) isn't broken.

Hi @SaraSoueidan,
yes, and it's a habit when editing html to pass it through html tidy.

The habit is dating back to the days http://acid3.acidtests.org when browsers weren't compliant to a standard - and now I think (my) websites should be compliant.

Just for my assurance to write properly and get used to sane html and not just produce gibberish.

The Acid3 Test

@SaraSoueidan Yes. To avoid stupid typos that browser correct algorithms fix in ways I did not expect. Oh, and to keep some wanker from saying my example is broken.

@SaraSoueidan no, because it's not very useful and is a pain to do so when the HTML is authored indirectly using a framework/template engine.

i instead try to validate the accessibility tree using Axe, either with a browser extension or in the CI. sometimes this also happens to catch invalid HTML

@SaraSoueidan
Yes. And the Schema validator.
I do it for the same reason I check the spelling on my pages; professionalism.
@SaraSoueidan I've done so a few times in my career, but I generally trust myself to write proper markup.
@SaraSoueidan no, I gave up because the vast majority of errors aren't exactly errors in the sense that don't break anything and add functionality that apparently isn't covered by the spec (yet?). But I just tried again and did find some attributes that are there for no good reason, so maybe I should again.
@SaraSoueidan I use it to help debug, intermediate results as well.

@SaraSoueidan I wanted to answer something along the lines that when you use a modern framework and modern tooling, you don’t need an HTML validator.

One validation of my SvelteKit website later, I am embarrassed šŸ™ˆ

@SaraSoueidan I sometimes do when I suspect nesting errors such as tags that weren’t closed lol
@SaraSoueidan oh and I used to use the nu validator for a long time when I still believed that the outline mattered. Nowadays I find less and less use for it
@SaraSoueidan Yes, it’s an invaluable tool to me. I use it both for my own code and when reviewing other people’s code.

@SaraSoueidan

I haven't validated HTML since the early 2000s?

Why? because I write flawless HTML 🤔

Bahahaha…more seriously, most of my HTML is simple enough that it would be hard *not* to pass.

@SaraSoueidan nearly on every project.
I heard it prevents some basic a11y issues and I like to have clean code :)
@SaraSoueidan Yes, mostly because I like things clean/correct. But it does help with problems further down the road where different browsers still sometimes handle invalid html differently.
@SaraSoueidan I do, yes, because it's part of doing the job properly.
@SaraSoueidan I generally don’t. Either the HTML is so simple, my internal parser does a good job to prevent issues, or the error is obscure and does not make a difference in practice. For example, validator.nu yells at me for inline XML processing instructions because my SVG icons are directly from their source code, but inlined. Could I parse out the XML processing instructions? Sure. Would it help anyone? Not really. (1/2)

It also complains that media is not an allowed attribute on the meta element, only to link to the HTML spec that says media is an allowed attribute. The same for form@method="dialog" which is totally valid.

If I were to write HTML for a living still, I probably would validate more often, but these days, it just feels not worth my time (because I rarely make obvious mistakes due to the conservative way I write code). (2/2)

@yatil @SaraSoueidan same here, I never validate my HTML.
@SaraSoueidan Yes, because I make mistakes.

@SaraSoueidan

Seldom. As when I write plain HTML my IDE validates it already. And when I use more complex setups, typically the compiler already yells at me.

Firefox still has the highlight of broken HTML when doing view-source: what often helps when I check the server side returned code.

This said, quite seldom as others also already said, as some validations are valid, but will never harm anyone.

@SaraSoueidan Yes, because it helps me catch certain classes of errors, e.g. duplicate ids or invalid element nesting. I using a browser extension that, with a single click, can send the html of the currently open page to validator.w3.org.

If I may self-promote here, I even wrote a blog post about which exact kind of errors html validation can catch šŸ˜€ https://angelika.me/2023/09/15/5-bugs-caused-by-invalid-html/

5 bugs that HTML validation caught for me | Angelika.me

Are you running your website through an HTML validator? No? Here's a list of 5 bugs that HTML validation caught for me before I released them to production.

@SaraSoueidan yes, to ensure that I'm following web standards and catch mistakes that I missed.
@SaraSoueidan I haven’t in ten years, after a while (going through a learning process) all I got was false negatives (with the old w3 validator, back when I used it it wasn’t very up to date). I do see that when I try my own website now I do get feedback that can teach me something so maybe I’ll try it again more often :)

@SaraSoueidan
Almost never whole pages but snippets with some regularity to confirm there aren't errors or to read how it describes errors I'm pretty sure are there.

.nu seems to be a few versions behind /nu/, it doesn't recognize <search> or `popover`, for example, and thinks <dialog> is not supported in all browsers.

https://validator.w3.org/nu/#textarea

Ready to check - Nu Html Checker

@SaraSoueidan I have a button at the bottom of each blog post to let everyone validate the HTML (https://blog.tomayac.com/2019/09/29/the-redesigned-blogccasion-is-live/#:~:text=Last%20not%20least%2C%20the%20Valid%20HTML5%20badge%20is%20inspired%20by%20Bradley%20Taunt%27s%20article%20Using%20HTML%20Validator%20Badges%20Again) I find that the validator doesn't catch up with the features I'm using, which, to be fair, tends to be more on the bleeding edge side. Example: https://validator.w3.org/nu/?doc=https://blog.tomayac.com/2025/07/26/what-a-difference-a-semicolon-makes/.
The redesigned Blogccasion is live

The personal blog of Thomas Steiner