logoalt Hacker News

yawaramintoday at 9:05 PM1 replyview on HN

> This is honestly all you need.

No, you need less than that! :-)

    ┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
    │                     how-to-make-a-damn-website.html                      │
    ├──────────────────────────────────────────────────────────────────────────┤
    │ <title>How to Make a Damn Website</title>                                │
    │ <h1>How to Make a Damn Website</h1>                                      │
    │                                                                          │
    │                                                                          │
    │ <p>A lot of people want to make a website but don’t know where to start  │
    │ or they get stuck.</p>                                                   │
    ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
HTML is very forgiving! You can start really simple and work your way up to more complexity when you need it.

Replies

susamtoday at 9:15 PM

Web browsers are indeed forgiving when it comes to incomplete HTML. Some time ago, I did a small experiment to see what minimal HTML is required to display a simple 'Hello' page while adhering to the specification, passing HTML Tidy validation and also satisfying the Nu HTML Checker. As far as I can tell, it is this:

  <!DOCTYPE html>
  <html lang="en">
  <meta charset="UTF-8">
  <title>Hello</title>
  <body>
  <p>Hello!
Remove any tag and the validation fails. Here is how the Tidy check looks:

  $ tidy -qe minimal.html
  $
And here's a Nu check link: https://validator.w3.org/nu/?doc=https%3A%2F%2Fsusam.net%2Fc...
show 1 reply