logoalt Hacker News

neilvlast Monday at 4:28 AM4 repliesview on HN

One way to get to this is to start with almost-'94 HTML:

  <!doctype html>
  <html>
      <head>
          <title>Some Topic</title>
      </head>
      <body>
          <h1>Some Topic</h1>

          <p>Information goes here.</p>

          <p>Information goes here.</p>

          <p>Information goes here.</p>

      </body>
  </html>
Then add a little non-'94 CSS styling.

If you decide to add an off-the-shelf wad of CSS, like Pico.css, consider hosting it alongside your HTML (rather than turning it into another third-party dependency and CDN cross-site surveillance tracker). Minified, and single-request.


Replies

divbzerolast Monday at 4:53 AM

This should be every web developer’s first webpage. No npx create-react-app ... or pip install django or any other layers in between.

nicboulast Monday at 10:09 AM

It's really that simple.

I run a website that's primarily text-based. When I change the base template, I still check that it works without CSS. This just means semantic HTML.

That being said, CSS is rarely that large. Even after a few years of relative indulgence, the gzipped CSS for the whole website is still something like 20kb.

valadaptivelast Monday at 5:09 AM

I always include `<meta charset="utf-8">`. Is that still necessary?

show 3 replies