Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML standardization #139

Open
anonwaha opened this issue Sep 23, 2024 · 1 comment
Open

HTML standardization #139

anonwaha opened this issue Sep 23, 2024 · 1 comment
Labels
enhancement For stuff that needs to be improved idea For your feature ideas. question Further information is requested

Comments

@anonwaha
Copy link
Collaborator

anonwaha commented Sep 23, 2024

TEH PROBLEM

Currently, Kokonotsuba's HTML output is an abominable mixture of different HTML standards - HTML 4.01, XHTML, HTML5, and in some cases not adhering to any standard at all. It's also doing a lot of styling with tags; (mis)using certain HTML tags/attributes (often deprecated ones) to modify the appearance of the page rather than using the appropriate HTML tags combined with CSS

TEH PROPOSAL

Since I'm going through Kokonotsuba's HTML/CSS output and overhauling it anyway (and since Kokonotsuba makes use of HTML5-only features such as <video> tags, localstorage, etc.), should I rewrite Kokonotsuba's existing HTML to be HTML5-compliant?

Note that I wouldn't use non-backwards compatible tags just for the sake of it, although they often fail gracefully and there are ways you can provide fallbacks for older browsers while still supporting newer features. I recommend reading https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/HTML_and_CSS#common_cross_browser_problems

TEH BENEFITS

  • Moar consistency
  • Moar convenience
  • Moar readability
  • Moar responsive
  • Moar semantic
  • Moar accessible
  • Moar compatibility with today's & tomorrow's browsers/devices
  • Moar years on ur life gained by not having to deal with the "quirks" and fussiness of ancient web browsers
  • Less DOM bloat
  • Less time wasted sitting around waiting for pages to load

TEH NOT SO BENEFITS

  • Less compatibility with old browsers/devices
    • Pre-2010 browsers will be the worst off; 2010-2015 will have a few issues here and there; 2015+ will be almost perfect
    • It's worth mentioning Kokonotsuba already doesn't fully work/display properly on older browsers in places since HTML5-only features are used. EDIT: In fact, most (if not all) of Kokonotsuba's existing JavaScript doesn't even work on IE11, which is from 2013 o_0
  • Moar work with little visible benefit to end users
  • Moar HTML authors with bad habits will have to change their ways lest we end up back where we are now

TEH CHANGES

If Kokonotsuba is to go full HTML5, here's a few examples of things that will be changed:

  • Remove XHTML-style self-closing tags (e.g. <meta /> -> <meta>)
  • Replace deprecated tags/attributes (<center>, <font>, align=, border=, etc.) with valid alternatives
  • Replace misused tags with more appropriate alternatives (e.g. use margin-bottom to add space below an element instead of <br>)
  • Replace/rearrange tags that are improperly placed inside tags they're not able to go in (e.g. <span style="color: red;"><div> -> <div class="redText">)
  • Other things that I can't remember right now
@anonwaha anonwaha added idea For your feature ideas. enhancement For stuff that needs to be improved question Further information is requested labels Sep 23, 2024
@hachikuji-san
Copy link
Collaborator

hachikuji-san commented Sep 23, 2024

should I rewrite Kokonotsuba's existing HTML to be HTML5-compliant?

i say yes. there is probably only 1 user that uses something like mypal/failmoon and even then im pretty sure failmoon supports some HTML5(?). Other points also outway the deficits.

Moar HTML authors with bad habits will have to change their ways lest we end up back where we are now

a lot of bad habits i picked up from kokonotsuba or other applications with outdated or poorly written HTML output so this would be a welcome change in any case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For stuff that needs to be improved idea For your feature ideas. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants