Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

HTML ugly? Nonsense.

  <!doctype html>
  <meta charset=utf-8>
  <title>Hello, world</title>

  <h1>Hello, world</h1>
  <p>This is a paragraph about HTML.
  <ul>
    <li>Bullet point
    <li>Bullet point
  </ul>
That's not ugly.


Wait, not closing <p> and <li> is valid?


Completely. You can, with a doctype, also omit <html>, <head> and <body>, too.

Not closing <li> is good, but I'd avoid it for <p>.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: