1. 32
    1. 3

      So, how do we refer to files that aren’t in the current folder? We can use the .. syntax like this. <link rel="stylesheet" href="../css/simple.css">

      I wonder why it recommends the ../ notation as the default, rather than the widespread practice of just doing /css/simple.css. It certainly should warn that the absolute notation breaks down when people try to host a website in a subdirectory like https://example.com/~jrandomhacker, but the book uses Neocities, which provides third-level domains.

      I also wonder why the book chose to start from teaching people to write non-well-formed HTML at first. I believe teaching people the structure first is important.

      But any manuals on making websites for beginner webmasters are certainly welcome.

      1. 7

        It works when you load the file locally.

        1. 2

          Ok, that’s a fair point — the book also recommends testing websites by opening them as folders.

          I wonder if it should recommend that. There are single-file web servers like RedBean, and I believe people generally should test the website through a web server, as it will be deployed. Having to manually track the depth of every page and add appropriate numbers of ../ seems like a perfect reason to rage-quit website building forever.

          Shameless plug: I added an option to relativize all links to my SSG, but that request came from people who wanted to host outputs of documentation generators in a subdirectory of their website and those documentation generators didn’t have an option to generate relative links or prepend a prefix, which just highlights how universal the web server root assumption is in practice…

        2. 4

          When showing html writing to kids 8+ I always start with invalid html. (Actually I start with a trivial example page with horrible typos - this triggers the desire to correct them). To get started publishing we do the least necessary and to see your effect is very motivating. Once the sophistication increases, we use tidy and progress to valid land.

          IMO valid or invalid isn’t a thing in the beginning. You won’t correct a baby on every mispronounced word, either.

          1. 3

            (I only glimpsed at it.) Writing invalid HTML is justifiable didactically, as you don’t need to explain a lot of boilerplate to get started. But I miss any reference to validation tools, later.

            1. 2

              relative paths allow changing the subdirectory nesting. Including, as Leah said, viewing locally (from within a subdirectory).

              1. 1

                I also wonder why the book chose to start from teaching people to write non-well-formed HTML at first.

                Are you referring to the (initially) missing <title> element, or something else?