Skip to main content

Julia Evans

« back to all TILs

You don't have to close <p> or <li> tags

I was writing HTML by hand today and was reminded that closing <p> and <li> tags is optional, which I learned about from this blog post: You are not required to close your <p>, <li>, <img>, or <br> tags in HTML.

It feels so much easier to just write the <li> tag at the beginning (as if it’s a bullet point) without worrying about the </li>.

My HTML linter doesn’t like it, but my HTML linter doesn’t like a lot of things and often I think I should just turn it off.