emikulic / darkhttpd

When you need a web server in a hurry.
https://unix4lyfe.org/darkhttpd/
ISC License
1.05k stars 87 forks source link

Update generated html #57

Closed g-rden closed 8 months ago

g-rden commented 8 months ago

I don't know too much about html, so this is an issue instead of an PR. As far as I can tell the html is not up to spec.

I thought about adding required <!DOCTYPE html> and removing <tt>, as it did nothing that <pre> doesn't do anyway and is now also deprecated.

The changes would look like this: https://github.com/g-rden/darkhttpd/commit/5914a6fbd28418e8f3587402df909cb22345e135

emikulic commented 8 months ago

This looks reasonable, send a PR. :)

Do people still use https://validator.w3.org/ ?

g-rden commented 8 months ago

Do people still use https://validator.w3.org/ ?

Idk, but I found it when researching for this

hhartzer commented 8 months ago

Might be worth running the output through that.

For what it's worth, I have found cases where I needed <tt> and <pre> to get what I wanted, but that may not be the case here.

g-rden commented 8 months ago

Might be worth running the output through that.

I have.

The only difference I could tell is that some parts where different colors when viewing with lynx. From comparing https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tt#technical_summary with https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#technical_summary I concluded that <tt> is probably redundant inside a <pre>.

If you find any differences, it might be possible replace <tt> with a non-deprecated element to get the same results.

hhartzer commented 8 months ago

Interesting, thank you! Sounds good.